A Mississippi school board was grossly discriminatory and mean-spirited when it told Constance McMillen that she could not attend her high school prom with her girlfriend. A ruling by a federal judge that Ms. McMillen’s constitutional rights had been violated is a welcome sign that gay people are continuing to make progress toward equality. It should also be a warning to school districts nationwide about the cost of discrimination.

Ms. McMillen, a senior at Itawamba Agricultural High School, has identified herself as a lesbian since the eighth grade. After the school learned that she was planning to take her girlfriend to the prom, it told her that the two could attend alone or with male dates but not as a couple. When Ms. McMillen asked if she could wear a tuxedo, she was told that she would have to wear a dress.

The American Civil Liberties Union wrote a letter protesting those decisions and the district responded by canceling the prom. It was a move that called to mind the school districts across the South that canceled their proms during the civil rights era rather than open them to black and white students on an equal basis. The A.C.L.U. sued on Ms. McMillen’s behalf.

The north Mississippi courtroom of Judge Glen H. Davidson, a former Tupelo city prosecutor named to the bench by Ronald Reagan, might not seem like the most hospitable forum for Ms. McMillen. But Judge Davidson ruled last week that the First Amendment right of self-expression is denied when students are prohibited from attending the prom with a same-sex date. Similarly, he said, Ms. McMillen’s right to communicate a message  that women should not be required to wear traditionally female clothing  was infringed when she was prohibited from wearing a tuxedo.