Comedian and producer Byron Allen leaves the Supreme Court after it heard Comcast's bid to evade a civil rights lawsuit he filed against the company, in Washington, U.S. November 13, 2019.

WASHINGTON — Comcast looked poised for victory during arguments on Wednesday over a $20 billion racial discrimination case brought by media mogul Byron Allen.

The win may not be final. The justices suggested they may erase the company's defeat before a lower court, but give Allen another shot to bring his case. If it does so, Allen could ultimately prevail.

"It's clear that they are looking to send the case forward. That's what we wanted," Allen said in an interview by phone following arguments. "We couldn't be happier."

Allen, a former comedian who owns the media company Entertainment Studios, alleges that Comcast discriminated against him when it declined to carry seven of his channels, including Cars.TV and Pets.TV, while entering into contracts to carry lesser-known, white-owned channels.

Comcast owns CNBC parent NBCUniversal.

The question before the Supreme Court was not whether Allen was discriminated against, which Comcast denies. Instead, it concerned the reach of the 1866 Civil Rights Act, which guarantees black and white citizens the equal right to make and enforce contracts.

Federal courts have given different explanations for how easy it should be to sue under the law.

Allen argues that all he should have to do at the initial stage of his lawsuit is to show that race was a motivating factor behind Comcast's decision. In contrast, Comcast says that Allen must prove that there are no race-neutral reasons that could explain his being refused the contract.

The 9th U.S. Circuit Court of Appeals ruled in favor of Allen, rejecting the decision of a federal district judge who dismissed the complaint. Conservative and liberal justices alike expressed deep skepticism of the 9th Circuit's reasoning on Wednesday.

Arguments were highly technical. They concerned at which stage in the legal process which standard should apply. Erwin Chemerinsky, Allen's attorney, conceded that Allen should have to meet the stricter standard to ultimately win his case. But he said that the lower bar should apply when a case is first brought.

"Why do we let you go further if you can't win?" Justice Stephen Breyer, a Clinton appointee, asked.

Justice Elena Kagan, an Obama-appointee said the idea of having two standards "just strikes me as confusing."

Kagan also noted that the 9th Circuit appeared to apply the low standard to all stages of the proceeding.

"That seems wrong, right?" she said. "Don't you think that the 9th Circuit has to be reversed?"

Chemerinsky didn't provide a direct answer, prompting Justice Neil Gorsuch, a Trump appointee, to press the matter.

"Don't you agree that the 9th Circuit was wrong?" he asked.

Justice Brett Kavanaugh then suggested that the court do away with the 9th Circuit's opinion, but order the lower court to analyze the matter once again, assuming that the higher burden applied to all stages of the legal proceeding.

"What is wrong with that decision?" Kavanaugh asked.

"Well, because it's not the issue before this court," Chemerinsky said.

Justice Ruth Bader Ginsburg was not present for arguments because she was at home with a stomach bug, a court spokeswoman said. She will still participate in the decision in the case based on the briefs and transcripts.

The case has attracted attention from civil rights groups.

Kristen Clarke, president of the Lawyers' Committee for Civil Rights Under Law, said in a statement that the case is "the most important civil rights case that will be heard by the Supreme Court this term."

The NAACP wrote in a brief in the matter that "Comcast's arguments would, in many cases, impose an impossible pleading burden on victims of discrimination."

The case also attracted the attention of Rep. Bobby Rush, D-Ill., who sent a letter to Comcast CEO Brian Roberts earlier this month criticizing the company's position in the case and saying it was "my belief that the Comcast Corporation needs to be broken up."

The Trump administration and the U.S. Chamber of Commerce filed briefs in the case in support of Comcast.

A Comcast spokesperson said in a statement that the company was "optimistic the Court will reverse the incorrect 9th Circuit decision and, in light of the trial court's dismissal three separate times of these discrimination claims, bring this case to an end."

"Comcast has a strong civil rights and diversity record and an outstanding history of supporting and fostering diverse programming from African-American owned channels," the spokesperson said.

In an email, Chemerinsky said he believed the argument "went well and focused as it should on what needs to be alleged to get into court with a race discrimination claim" under the 1866 law.

"I am hopeful the Court will agree that it is enough to say that race is a motivating factor in the denial of a contract," he wrote.

The case is Comcast Corporation v. National Association of African American-Owned Media, No. 18-1171. A decision in the matter is expected by the end of June.

Disclosure: Comcast owns CNBC parent NBCUniversal.