Professional soccer players in the United States have reached an historic agreement with the sport’s governing body. The deal marks the end of a six-year legal battle over equal pay for male and female players. The deal promises female players $24 million plus bonuses that are equal to what male soccer players receive. A “bonus” is extra money given to players for doing well at major competitions. The U.S. Soccer Federation, or USSF, and the women announced the deal Tuesday. The women will divide $22 million, about one-third of what they had sought in damages. The USSF also agreed to establish a separate fund of $2 million. The money will be used to support players after their careers end as well as help grow the sport of women’s soccer. The USSF promised to provide an equal rate of pay for the women’s and men’s national teams including World Cup bonuses. “For our generation, knowing that we’re going to leave the game in an exponentially better place than when we found it is everything,” soccer player Megan Rapinoe told The Associated Press. “That’s what it’s all about because, to be honest, there is no justice in all of this if we don’t make sure it never happens again.”