In a ruling last week, a judge wrote that paying college athletes ‘could diminish the popularity of college sports.’ (Matt Slocum/AP)

Last week, just minutes after his client received a six-month prison sentence for brokering illicit payments to the families of top college basketball recruits, attorney Steve Haney stepped into the hallway outside the courtroom on the 21st floor of a federal courthouse in Lower Manhattan and made the argument to reporters that the judge had prevented him from making during the trial months before.

His client, aspiring NBA agent Christian Dawkins, was something of a modern-day Robin Hood, Haney argued. The NCAA’s amateurism rules that made the secret payments his client arranged illicit, Haney suggested, were exploitative and destined for abolition.

“When we look back in 20 years, we’re going to ask, ‘Why weren’t college basketball players paid?’ ” Haney said.

Three days later and nearly 3,000 miles away, however, a federal judge in California issued a ruling in an unrelated, closely watched civil case that suggested a future with paid college athletes might be further off than Haney envisioned.

In a 104-page decision released Friday night — a ruling that is still being digested, analyzed and debated this week by officials across college sports — Judge Claudia Ann Wilken gave a technical victory to thousands of former college football and basketball players but a moral victory to the NCAA and college conferences.

In her ruling in the case titled “National Collegiate Athletic Association Grant-In-Aid Cap Antitrust Litigation,” Wilken agreed with the athletes that NCAA rules capping their compensation at the value of a full scholarship violate antitrust law.

But as a legal remedy, Wilken stopped far short of the open market the athletes had sought, one in which each conference could set its own rules for what member schools could offer top recruits. Instead, she issued an injunction that forbids the NCAA from restricting “compensation or benefits related to education.”

In the injunction, Wilken included a long list of potential perks that are prohibited by NCAA guidelines, such as computers, science equipment and musical instruments, as well as scholarships for graduate degrees, vocational school or even paid postgraduate internships.

The NCAA is expected to appeal, which would put Wilken’s ruling and injunction on hold until an appeals court rules, possibly a year or more away.

While Wilken spent the bulk of the 104 pages tossing aside arguments advanced by the NCAA in support of its current restrictions — rules that had “severe anticompetitive effects” and “harmed” athletes by depriving them of “compensation they would otherwise receive for their athletic services,” Wilken wrote — she ultimately agreed with the NCAA on one critically important assertion: People who watch and follow college sports value the fact that the athletes are not professionals.

“The Court does credit the importance to consumer demand of maintaining a distinction between college and professional sports,” Wilken wrote. Allowing schools to pay athletes, Wilken wrote, “could diminish the popularity of college sports as a product distinct from professional sports.”

These passages are why the NCAA, in a statement about a case it technically lost, celebrated as if it had won a partial victory.

“The court’s decision recognizes that college sports should be played by student-athletes, not by paid professionals,” Donald Remy, the NCAA’s chief legal officer, 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.”

The athletes believed Wilken was a receptive audience. In 2014, she sent a jolt through the college sports establishment with her ruling in a case brought by former UCLA basketball player Ed O’Bannon, in which she found NCAA rules violated antitrust law and athletes should be entitled to compensation for the use of their names, images and likenesses in video games and television broadcasts.

That ruling was partly overturned by appeals judges, who agreed the NCAA had violated antitrust law but tossed out proposed payments to athletes as a “quantum leap” for college sports. Gabe Feldman, law professor and director of the sports law program at Tulane Law School, was one of several legal experts who speculated Wilken had that appeals ruling in mind as she crafted this latest decision.

“It’s another technical loss for the NCAA . . . but it upholds the core of the NCAA’s amateurism restrictions . . . and falls far short of what the plaintiffs were seeking,” Feldman said. “The people who were expecting fundamental change in college sports from this ruling have to be disappointed.”

Jeffrey Kessler, the famed sports labor attorney who was among those representing the athletes, argued in a phone interview that his side had won a clear-cut victory. He seized on passages in Wilken’s ruling in which she appeared to approve of schools offering payments capped at $5,600 per year for each athlete for academic advancement. Theoretically, based on Kessler’s interpretation of the ruling, a school could offer athletes $28,000 over the course of a four-year career: $5,600 for each year of taking classes and an additional $5,600 for graduating.

Kessler’s reading of the cash payments section was disputed by other legal experts, but he also celebrated the other academic-related perks the judge ruled schools should be able to offer.

“This is huge. . . . They can get computers, all sorts of equipment that they need to do their studies,” Kessler said. “Is this a complete freeing of the market? No. But this is a dramatic difference.”

Kessler has another lawsuit against the NCAA over its amateurism model, currently on hold because of this case, that he could revive and refile in federal court in a different district. This week, he declined to discuss his plans for that case, other than to say he will await a ruling by appeals judges in this case before making a decision.

Among those who have been waging the legal battle against the NCAA for more than a decade, however, the response to the ruling was much more muted.

“The NCAA is now a serial offender of antitrust laws, and that should say a lot. . . . But this could have been something that would have been much more impactful,” said Ramogi Huma, president and founder of the National College Players Association.

Huma was motivated to become an activist working for the rights of college athletes after his experience as a linebacker playing for UCLA in the 1990s, when one of his teammates, all-American Donnie Edwards, was suspended by the NCAA and ordered to pay restitution for accepting $150 in groceries from a sports agent.

Huma has been involved with several legal challenges to the NCAA — including the O’Bannon case and a push by football players at Northwestern University in 2014 to unionize — that, while failing to fundamentally change the economy of major college sports, have prompted policy changes that have improved life for college athletes. Colleges in the five wealthiest conferences now offer athletes unlimited food, guaranteed four-year ­scholarships and modest ­“cost-of-attendance” stipends.

But the more consequential victory remains elusive. This most recent ruling, to Huma, is a sign that perhaps the federal courts will not provide the results he hoped.

A few minutes after a phone interview with a reporter Monday, Huma said, he had another call planned, to discuss with colleagues his next path of attacking NCAA rules: legislation. Rep. Mark Walker (R-N.C.) has proposed a bill that would allow college athletes to sign endorsement and sponsorship deals.

“The progress has been steady, but it’s just taking too long,” Huma said. “But the game is far from over.”