Comcast has struck a deal to carry media mogul Byron Allen’s channels on its cable systems, ending a contentious business dispute and racial discrimination case that went all the way to the U.S. Supreme Court.

The agreement, which allows Comcast to carry the Weather Channel and other networks owned by Allen, comes more than two months after the Supreme Court unanimously sided with Comcast in a high-stakes civil rights case. The deal also comes amid nationwide protests over racial injustice and police brutality.

Allen will withdraw his $20 billion racial discrimination lawsuit against the Philadelphia cable giant, according to a statement from his company, Entertainment Studios Networks. Allen, an African American entertainment executive, had said Comcast discriminated against him when it refused to carry his cable-TV channels. Comcast said race had nothing to do with rejecting Allen’s channels, noting that they had low ratings.

Under the deal announced Thursday, Comcast will carry three channels that Allen wanted on Xfinity cable packages: Comedy.TV, Recipe.TV, and JusticeCentral.TV. The deal also allows Comcast to continue carrying the Weather Channel — which Allen acquired after he filed the suit in 2015 — and 14 broadcast television stations.

Financial terms of the deal were not disclosed.

Allen’s case was closely watched by legal experts and civil rights groups as it made its way to the Supreme Court. While the high court did not weigh the merits of Allen’s allegations, it ruled in March that he needed to show race was the determining reason the cable company refused to carry his channels for his discrimination case to survive.

Civil rights groups warned that the Comcast victory could make it harder for others to bring racial discrimination cases by setting a high bar. The case also drew in business groups and the Trump administration, which filed legal briefs supporting Comcast, and more than two dozen civil rights groups, including the NAACP, which backed Allen.

Comcast chairman and CEO Brian Roberts said Monday that the media company would spend $100 million over the next three years to combat racial injustice and inequality. Responding to the nationwide protests over police brutality against black Americans, Comcast said it plans to give grants to civil rights groups, accelerate efforts to diversify its workforce, and commit funds to small businesses forced to close due to the coronavirus pandemic, with much of the money going to firms owned by people of color.

Allen is a successful comedian who worked with Jay Leno and David Letterman and now controls the largest African American-owned entertainment company in Hollywood. In February 2015, when he sued Comcast in federal court for not carrying his channels, Comcast was seeking to acquire Time Warner Cable, which would later be acquired by Charter Communications.

He filed his $20 billion suit under Section 1981 of the Civil Rights Act of 1866, a Reconstruction-era law that prohibits discrimination against African Americans in business contracts. Specifically, the law ensures that everyone in the United States has the “same right” to make and enforce contracts.

A federal judge initially dismissed the suit, brought by Allen’s Entertainment Studios Networks and the National Association of African American-Owned Media, concluding that there could be legitimate business reasons for Comcast to act as it did. Allen then appealed to the Ninth Circuit, which ruled that his suit had sufficient claims to proceed to discovery and depositions.

Comcast petitioned the Supreme Court to hear the case, arguing that the Ninth Circuit’s decision loosened standards on discrimination cases. In a 9-0 decision, the Supreme Court sided with Comcast, ruling that a person filing a racial-discrimination lawsuit must allege and ultimately prove that race was the determining reason that a contract decision was made.