The Supreme Court ruled 5-4 on Thursday to reject a case that could have significantly weakened the Fair Housing Act (FHA), a landmark civil rights law. The ruling means the law will continue to cover actions in the housing sphere with a discriminatory result—known as disparate impact—not just intentional discrimination.

“Recognition of disparate-impact claims is consistent with the FHA’s central purpose,” Justice Anthony Kennedy, wrote in the court’s majority opinion. Kennedy was joined by Justices Kagan, Sotomayor, Ginsburg, and Breyer. Chief Justice Roberts and Justices Scalia, Thomas, and Alito dissented.

Kennedy wrote that the use of disparate impact must be limited, so that it doesn’t simply cover any action that happens to affect one group more than another. But he noted that disparate impact under the FHA has played a key role in promoting racial equality in housing and fighting discrimination.

RELATED: Whites recovered from recession faster than blacks: report

“[S]ince the passage of the Fair Housing Act in 1968 and against the backdrop of disparate-impact liability in nearly every jurisdiction, many cities have become more diverse,” Kennedy wrote. “The FHA must play an important part in avoiding the Kerner Commission’s grim prophecy that ‘[o]ur Nation is moving toward two societies, one black, one white—separate and unequal.’ … The Court acknowledges the Fair Housing Act’s continuing role in moving the Nation toward a more integrated society.”

In a dissent, Thomas argued that disparate impact as a concept is unconstitutional.

“Racial imbalances do not always disfavor minorities,” Thomas wrote at one point. “[F]or roughly a quarter-century now, over 70 percent of National Basketball Association players have been black.”

In a separate dissent, Roberts, Alito, and Scalia argued that Congress didn’t intend to include disparate impact in the FHA.

The Fair Housing Act, passed in 1968 a week after the death of Martin Luther King Jr., is a key part of the panoply of civil rights legislation that transformed the country half a century ago.

The case, Texas Department of Housing and Community Affairs v. The Inclusive Community Project, Inc., arose when a Texas non-profit, The Inclusive Communities Project, claimed the state was approving tax credits for low-income housing only in heavily African-American neighborhoods of Dallas, and denying tax credits in white neighborhoods. That approach, they said, has prolonged the city’s racial segregation, making it harder for poor blacks to have a shot at upward mobility. In response, Texas argued that it was just trying to comply with federal mandates governing the use of tax credits, and that, since it wasn’t intentionally discriminating, it wasn’t running afoul of the FHA.

A district court and an appeals court—the conservative 5th Circuit—had both ruled that the FHA does cover disparate impact. And every other appeals court that has ruled on the question, as well as almost every other district court, had come to the same conclusion.

Disparate impact has been central to how the FHA has been used in the past to stop housing discrimination. For instance, in 2011, the lender Countrywide agreed to pay $335 million to settle allegations that it charged 200,000 minority borrowers more than white borrowers who posed the same credit risk. If the FHA hadn’t allowed disparate impact, the government would have had to find evidence of intentional racial bias in Countrywide’s lending policies, a high bar to meet. That would have made it far more difficult to hold Countrywide accountable.

“The Supreme Court has rightly recognized disparate impact claims and the important role they play in promoting fairness and inclusion in American society,” said Jon Greenbaum, chief counsel of the Lawyers’ Committee for Civil Rights Under Law. “Focusing on the effects of a policy or practice, rather than the intent behind it, is the most effective way of dismantling structural barriers to equal opportunity and is necessary because discrimination is often subtle and covert.”

Sherrilyn Ifill, the president of the NAACP Legal Defense Fund, cheered the ruling as a major victory for efforts to combat discrimination and dismantle the lingering effects of segregation. Ifill said that although Kennedy did take pains to limit when disparate impact can be used, his ruling didn’t appear to contain a clear standard on the issue which might have the effect of narrowing its use. And she said that recent events around the country that have brought issues of racial inequality to the fore underline how important it is to maintain strong anti-discrimination laws.

The law also was used in the recent past to address alleged racial segregation in McKinney, Texas, the Dallas suburb that gained national attention last month after a pool party attended by mostly black teens led some local whites to call police, one of whom drew his gun on party-goers. Just as in the case the Supreme Court took, the city was accused of supporting low-income housing in minority neighborhoods but not white neighborhoods, perpetuating a history of segregation. The city ultimately agreed in a settlement to fund low-income housing in white neighborhoods.

The ruling also comes at a time when the federal government was poised to adopt a new, robust approach to enforcing the FHA. In response to last year’s unrest in Ferguson, Missouri—in part the result of discriminatory housing policies—the Department of Housing and Urban Development issued strong guidelines on how to further fair housing policies under the FHA, including affirming the role of disparate impact.