The sad case of Constance McMillen, the Mississippi student whose high school cancelled its prom after she asked to take her girlfriend and wear a tuxedo, has a happy ending. A federal judge has ruled that McMillen's rights were violated by the school's decision, and a replacement prom hosted privately can also go ahead after its organisers promised to open it to all students, including McMillen.

The American Civil Liberties Union, which backed McMillen's lawsuit, quoted her in its announcement celebrating the legal decision:

"It feels really good that the court realised that the school was violating my rights and discriminating against me by cancelling the prom. All I ever wanted was for my school to treat me and my girlfriend like any other couple that wants to go to prom," said McMillen, an 18-year-old senior at Itawamba Agricultural High School in Fulton, Mississippi. "Now we can all get back to things like picking out our prom night outfits and thinking about corsages."

Another prom is also being organised by the Mississippi Safe Schools Coalition, a support group for gay and lesbian students. The event will be open to all students in the state, gay as well as straight. Last week McMillen was a guest on Ellen DeGeneres's talkshow and received a $30,000 university scholarship.

And the bigger issue at stake – helping future gay and lesbian students avoid similar discrimination – was also resolved. "This ruling clearly tells school districts there is a first amendment right to bring same-sex dates to the prom," ACLU lawyer Kristy Bennett told the Jackson Clarion-Ledger newspaper. The Clarion-Ledger also reported:

Kenneth Sherrill, a political science professor at Hunter College in New York City, said the international attention drawn by the story is remarkable, as is the outpouring of support for McMillen. Sherrill, who studies social and political attitudes toward gays and lesbians, said the response shows "a cultural shift in the country toward greater tolerance." People blaming McMillen or condemning her lifestyle are "an embattled minority," he said. "That's not mainstream anymore. Twenty years ago it might have been," he said.

Not everyone is happy with the court's ruling. The conservative Christian lobbying group American Family Association said: "This is not about speech at all, but about the homosexual agenda. It's about the schoolyard bullies at the ACLU using an activist federal judge to force schools to normalise sexually aberrant behaviour."