NEW YORK (AP) — Major League Baseball agreed to pay minor leaguers $185 million to settle a federal lawsuit that has progressed through the courts for eight years without reaching a trial.

The settlement, announced May 10, was filed Friday with the U.S. District Court in San Francisco, where Chief Magistrate Judge Joseph C. Spero is expected to grant his approval.

If approved, $120,197,300 will be split among the players, $55.5 million will go the the players’ lawyers, up to $5.5 million will be the reimbursement costs of the suit, $450,000 will be for the costs of administering the settlement, $637,000 will go to incentive awards for the player representatives in the suit, $400,000 for a contingency fund and $2,315,000 for a payment under the California Private Attorney General Act.

As part of the settlement, MLB agreed to rescind any prohibitions against teams paying wages to minor league players outside of the season.

The suit was filed in 2014 by first baseman/outfielder Aaron Senne, a 10th-round pick of the Marlins in 2009 who retired in 2013, and two other retired players who had been lower-round selections: Kansas City infielder Michael Liberto and San Francisco pitcher Oliver Odle. They claimed violations of the federal Fair Labor Standards Act and state minimum wage and overtime requirements for a work week they estimated at 50 to 60 hours.

Spero wrote in a pretrial ruling in March that minor leaguers are year-round employees who work during training time and found MLB violated Arizona’s state minimum wage law and was liable for triple damages. Spero also ruled MLB did not comply with California wage statement requirements, awarding $1,882,650 in penalties.

He said minor leaguers should be paid for travel time to road games in the California League and to practice in Arizona and Florida.

In 2017, the players suing were defined as those with minor league contracts who played in the California League for at least seven straight days starting on Feb. 7, 2010, or Feb. 7, 2011, depending on state or federal claims; those who participated in spring training, extended spring training instructional leagues in Arizona starting Feb. 7, 2011; and those who participated in spring training, extended spring training instructional leagues in Florida starting Feb. 7, 2009.