The Supreme Court handed a win to Comcast on Monday in a long-running racial discrimination suit brought by the black media mogul Byron Allen, who alleged the cable giant discriminated against him when it refused to carry channels operated by his television network, Entertainment Studios.

In a unanimous opinion authored by Justice Neil Gorsuch, the top court agreed with Comcast in upholding a high bar for bringing suits under the 1866 Civil Rights Act. The justices sent the case back to the 9th U.S. Circuit Court of Appeals, which had earlier ruled Allen need only reach an easier-to-meet discrimination standard, to consider the matter once again.

The outcome appeared likely after oral arguments in November, when the justices appeared skeptical of Allen's position. The opinion was handed down while the court remains closed to the public the because of the coronavirus pandemic ravaging the nation.

Civil rights activists were closely watching the battle. Kristen Clarke, president of the Lawyers' Committee for Civil Rights Under Law, has called the matter the most important civil rights case of the term. In a statement issued on Monday, Clarke said the court's opinion "weakens our nation's oldest civil rights statute and may shut the courthouse door on some discrimination victims."

The case erupted after Comcast, which owns CNBC parent company NBCUniversal, refused to carry Entertainment Studios channels like JusticeCentral.TV, Comedy.TV, Pets.TV and Cars.TV, citing limited bandwidth and a preference for news and sports coverage.

Entertainment Studios argued that Comcast's reasons for refusing to carry its channels were pretexts, and that Comcast had a history of rejecting business from "100% African American-owned media companies."

The legal question before the court was whether Allen would have to prove that Comcast would have carried his channels "but for" his race — that is to say, that they would have done so if he was not black.

Comcast argued in favor of that strict "but for" standard, while Allen said he should be allowed to sue even if race was only one factor among others, or what's known as a "motivating factor" standard.

Allen acknowledged that the tougher standard would apply to ultimately win the suit, but argued that he should only have to meet the lower barrier during the legal battle's early stages.

A district court dismissed Allen's suit from the get-go because it failed to meet the but-for standard, but that decision was reversed by the 9th Circuit, allowing Allen to proceed. The Supreme Court reversed the appeals court's ruling, ordering it to reconsider whether Allen may bring his case.

Gorsuch, in his opinion for the court, said that the Civil War-era law required alleged victims of discrimination to adhere to the higher standard.

"Few legal principles are better established than the rule requiring a plaintiff to establish causation," Gorsuch wrote in the opinion's very first sentence. The Trump-appointee, whose interpretation of the law is generally guided by a strict reading of the text, noted that in this case, the text did not establish a standard. But Gorsuch said the text was "suggestive."

"The guarantee that each person is entitled to the 'same right ... as is enjoyed by white citizens' directs our attention to the counterfactual — what would have happened if the plaintiff had been white?" Gorsuch wrote. "This focus fits naturally with the ordinary rule that a plaintiff must prove but-for causation."

Comcast cheered the decision.

"We are pleased the Supreme Court unanimously restored certainty on the standard to bring and prove civil rights claims," the company said in a statement. "The well-established framework that has protected civil rights for decades continues. The nation's civil rights laws have not changed with this ruling; they remain the same as before the case was filed."

Allen said in a statement that the decision was "harmful to the civil rights of millions of Americans."

"This is a very bad day for our country," he said. "We will continue our fight by going to Congress and the presidential candidates to revise the statute to overcome this decision by the United States Supreme Court, which significantly diminishes our civil rights."

Erwin Chemerinsky, a leading scholar of constitutional law who represented Allen before the top court, also criticized the decision.

"I think it is a terrible decision for civil rights in saying that civil rights statutes must be interpreted to require that 'but for' causation be pled and proven, even if they don't use language indicating that," Chemerinsky, dean of the University of California at Berkeley's law school, wrote. "It is a very difficult standard to meet."

Chemerinsky said he believed the battle "will now shift to Congress" to amend the law "to allow claims to go forward on a showing that race is a motivating factor in the denial of a contract."

Justice Ruth Bader Ginsburg, the most senior member of the court's liberal wing, was the only justice to pen a separate opinion in the case. Ginsburg concurred with the judgment of the court, but wrote separately to note that she disagreed with Comcast's assertion that the civil rights legislation only barred discrimination in a contract's final stages.

"Thus, a lender would not violate [the law] by requiring prospective borrowers to provide one reference letter if they are white and five if they are black," Ginsburg wrote. "Nor would an employer violate [the law] by reimbursing expenses for white interviewees but requiring black applicants to pay their own way."

The court's opinion, written by Gorsuch, neither accepted nor rejected Comcast's claim on that front.

Ginsburg also wrote, in a footnote, that she disagreed with the but-for standard in discrimination cases.

"I recognize, however, that our precedent now establishes this form of causation as a 'default rul[e]' in the present context," she wrote.

Disclosure: Comcast owns CNBC parent NBCUniversal.