A judge ruled against the NCAA on Friday night in a federal antitrust lawsuit, saying football and basketball players should be permitted to receive more compensation from schools but only if the benefits are tied to education.

The ruling Friday night from U.S. District Judge Claudia Wilken in Oakland, California, said the NCAA cannot "limit compensation or benefits related to education." That means more scholarship money to pursue postgraduate degrees or finish undergraduate degrees and items that could be considered school supplies such as computers.

The plaintiffs in the so-called Alston cases were seeking much more.

Plaintiffs had asked the judge to lift all NCAA caps on compensation and strike down all rules prohibiting schools from giving athletes in revenue-generating sports more financial incentives for competing. The goal was to create a free market, where conferences set rules for compensating athletes, but this ruling still allows the NCAA to prohibit cash compensation untethered to education-related expenses.

The claim against the NCAA and the 11 conferences that have participated in the FBS was originally brought by former West Virginia football player Shawne Alston. It was later merged with similar lawsuits, including a notable case brought by former Clemson football player Martin Jenkins.

Plaintiffs argued the NCAA illegally restricts schools from compensating football and men's and women's basketball players beyond what is traditionally covered by a scholarship. That includes tuition, room and board, and books, plus a cost-of-attendance stipend to cover incidentals such as travel.

Plaintiffs touted the ruling as "monumental."

"We have proven to the court that the NCAA's weak justifications for this unfair system are based on a self-serving mythology that does not match the facts," said Steve Berman, the Seattle-based lead attorney for the plaintiffs. "Today's ruling will change college sports as we know it, forever."

The NCAA argued that altering amateurism rules would lead to pay-for-play, fundamentally damaging college sports and harming academic integration of athletes.

"The court's decision recognizes that college sports should be played by student-athletes, not by paid professionals," NCAA chief legal counsel Donald Remy said in a statement. "The decision acknowledges that the popularity of college sports stems in part from the fact that these athletes are indeed students, who must not be paid unlimited cash sums unrelated to education. NCAA rules actively provide a pathway for tens of thousands of student-athletes each year to receive a college education debt-free."

The 9th Circuit Court of Appeals has already said it expects to take the case. It is possible the injunction will be stayed until the 9th Circuit rules.

"We believe the ruling is inconsistent with the decision by the 9th Circuit Court of Appeals in O'Bannon," Remy said. "That decision held that the rules governing college athletics would be better developed outside the courtroom, including rules around the education-related support that schools provide."

Wilken is the same judge who ruled on the O'Bannon case, which challenged the NCAA's right to use athletes' names, images and likenesses without compensation. That case also produced a mixed ruling that eventually went to the 9th Circuit Court of Appeals.

Wilken also ruled the NCAA was required to allow schools to factor in their federally determined cost of attendance into the value of an athletic scholarship. That is now common practice in major college sports, though schools were already moving toward NCAA legislation allowing for cost of attendance when Wilken made her ruling.

The plaintiffs provided three alternative structures to what is currently in place. The first would have eliminated all NCAA limits on compensations -- a true free market -- that would have opened the door for schools to make significant monetary offers for athletes tied to their on-field value. Individual conferences would be tasked with setting the limits their member schools would have to abide by. This was the desired option from the plaintiff's legal team.

An implementation of such change, Wilken noted, would require a fair amount of trial-and-error to find a feasible level of compensation that would not affect consumer demand, and that process could produce unintended consequences.

The second proposal would allow the NCAA to continue limiting compensation, except when expenses are related to education or an existing list of benefits incidental to athletics the NCAA currently allows and caps. The third proposal -- which Wilken derived her ruling from -- would have allowed the NCAA to continue to limit compensation given in exchange for athletic services but prevent any limit on benefits tied to education.

ESPN's Kyle Bonagura and The Associated Press contributed to this report.