CLEVELAND, Miss. — The multicultural high school band kicked off a punchy “Pomp and Circumstance” as the 2016 graduates of Cleveland High School marched across the gymnasium. They were a near-equal mix of black and white students, with the occasional Nguyen, Patel or Rojas sprinkled among them.

Here in the heart of the Mississippi Delta — where whites once howled over federal desegregation orders, ignored them for years, then largely abandoned their public schools — it seemed, in many ways, a rare scene of racial redemption. The school is 45 percent black and 47 percent white. A white co-valedictorian spoke, followed by a black one, Jasmine Shepard, who argued that their educational experience had been enhanced by the diversity.

“We are better prepared for the world because of it,” Ms. Shepard said.

But the ceremony also came days after a federal judge ruled, in a case that has dragged on for a half-century, that Cleveland High is part of a school district that has, in other ways, “deprived generations of students of the constitutionally guaranteed right of an integrated education.” The town’s other high school, East Side High, is virtually all black, as segregated as the schools before the Supreme Court’s 1954 ruling declaring school segregation illegal.

If the judge’s ruling stands, Cleveland High, as Ms. Shepard and her classmates knew it, may soon be no more.