College football and basketball players could be in line for paydays worth thousands of dollars once they leave school after a landmark ruling Friday that may change the way the NCAA does business.

A federal judge ruled that the NCAA can't stop players from selling the rights to their names, images and likenesses, striking down NCAA regulations that prohibit them from getting anything other than scholarships and the cost of attendance at schools.

U.S. District Judge Claudia Wilken in Oakland, California, ruled in favor of former UCLA basketball star Ed O'Bannon and 19 others in a lawsuit that challenged the NCAA's regulation of college athletics on antitrust grounds. The injunction she issued allows players at big schools to have money generated by television contracts put into a trust fund to pay them when they leave.

In a partial victory for the NCAA, though, Wilken said the body that governs college athletics could set a cap on the money paid to athletes, as long as it allows at least $5,000 per athlete per year of competition. Individual schools could offer less money, she said, but only if they don't unlawfully conspire among themselves to set those amounts.

That means FBS football players and Division I basketball players who are on rosters for four years could potentially get around $20,000 when they leave school. Wilken said she set the $5,000 annual threshold to balance the NCAA's fears about huge payments to players.

"The NCAA's witnesses stated that their concerns about student-athlete compensation would be minimized or negated if compensation was capped at a few thousand dollars per year," Wilken wrote.

The NCAA said it disagreed with the decision, but was still reviewing it.

But Sonny Vaccaro, the former athletic shoe representative who recruited O'Bannon to launch the suit, said it was a huge win for college athletes yet to come."The kids who are going to benefit from this are kids who don't even know what we did today," Vaccaro said. "It may only be $5,000 but it's $5,000 more than they get now."

O'Bannon issued a statement calling the decision "a game changer" and precisely what he was after when he joined the suit.

"I just wanted to right a wrong," O'Bannon said. "It is only fair that your own name, image and likeness belong to you, regardless of your definition of amateurism. Judge Wilken's ruling ensures that basic principle shall apply to all participants in college athletics."

The ruling comes after a five-year battle by O'Bannon and others on behalf of college athletes to receive a share of the billions of dollars generated by college athletics by huge television contracts. O'Bannon, who was MVP of the 1995 UCLA national championship basketball team, said he signed on as lead plaintiff after seeing his image in a video game authorized by the NCAA that he was not paid for.

Any payments to athletes would not be immediate. The ruling said regulations on pay will not take effect until the start of the next FBS football and Division I basketball recruiting cycle. Wilken said they will not affect any prospective recruits before July 1, 2016. The NCAA could also appeal, and has said previously that it would take the issue all the way to the Supreme Court.

Former athletes will not be paid, because they gave up their right to damages in a pre-trial move so the case would be heard by a judge, not a jury.

As part of her ruling, Wilken rejected both the NCAA's definition of amateurism and its justification for not paying players. But she did not prohibit the NCAA from enforcing all of its other rules and regulations and said that some restrictions on paying players may still serve a limited purpose if they are necessary to maintain the popularity of major college football and basketball.

"The big picture is the NCAA lost the definition of amateurism it has been pushing for years," said Michael Carrier, a Rutgers law professor and antitrust expert.

Wilken was not asked to rule on the fairness of a system that pays almost everyone but the athletes themselves. Instead, the case was centered on federal antitrust law and whether the prohibition against paying players promotes the game of college football and does not restrain competition in the marketplace.

During a three-week trial in June, attorneys for the NCAA said moving away from the concept of amateurism where players participated for the love of the game would drive spectators away from college sports and would upset the competitive balance among schools and conferences.

Several players testified during the trial that they viewed playing sports as their main occupation in college, saying the many hours they had to devote to the sport made it difficult — if not impossible — to function like regular students.

"I was an athlete masquerading as a student," O'Bannon said at trial. "I was there strictly to play basketball. I did basically the minimum to make sure I kept my eligibility academically so I could continue to play."

Witnesses called by the NCAA spoke of the education provided to athletes as payment for their services and said the college model has functioned well for more than a century. They contended that paying players would make college sports less popular and could force schools to cut other programs funded by the hundreds of millions of dollars taken in by big-time athletics.

The lawsuit was part of a tide of pressure on the NCAA to change the amateur model. Football players at Northwestern University have pushed to be allowed to unionize, and other lawsuits have claimed that athletes have a right to better compensation. This week, the NCAA's board voted to allow the five wealthiest conferences in the country to set their own rules, paving the way for the 65 schools in those conferences to potentially offer richer scholarships and health benefits to players.

Carrier said the outcome might not be scary at all because the money may not be huge and will be paid only after a player's career is over.

"We'll soon see that this isn't the end of the world as we know it," Carrier said.

"The irony of this is that a lot of the other changes in college sports going on were made because of this impending ruling."