The women's national soccer team lost a key match in its legal fight with the group that runs U.S. soccer.

A federal district court in Chicago ruled in favor of the U.S. Soccer Federation, saying the women's national team is subject to a contract that prevents players from striking.

The previous agreement expired in 2012 but, according to U.S. Soccer, it was modified and extended to last from 2013 to 2016. The modification included a no-strike clause.

U.S. Soccer brought a lawsuit against the players' union after the union's lawyer denied that there was a valid contract and the federation saw that as a threat to strike.

Related: U.S. women soccer players charge pay discrimination

The expiration date of the contract is important, because it means women on the national team cannot go on strike before this summer's Olympics in Rio de Janeiro.

The women's team alleges that its players are paid less than the players on the men's national team. Five players on the team have brought a complaint against U.S. Soccer before the Equal Employment Opportunity Commission. A decision in that complaint is pending.

"The court's ruling today does not negate the fact that US Soccer does not fairly compensate the Women's National Team, or in any way impact the players' demands for equal pay for equal work," said Rich Nichols, attorney for the players' union. "We respect the judge's decision and naturally, the members of the USWNT look forward to representing the USA in the Olympic Games."