The U.S. Supreme Court said Wednesday that same-sex marriages can go ahead in Kansas.

The nation's highest court denied the state's request to prevent gay and lesbian couples from marrying while Kansas fights the issue in court. The state constitution includes a provision banning gay marriage, approved overwhelmingly by voters in 2005.

"Now, this is a day to celebrate," said Tom Witt, executive director of the gay rights group Equality Kansas.

A federal district judge last week blocked the state from enforcing its ban, saying it was in keeping with an earlier ruling by a federal appeals court that struck down bans in Oklahoma and Utah.

The judge's ruling was supposed to go into effect Tuesday, but Justice Sonia Sotomayor temporarily put it on hold while the high court reviewed the case.

Justices Antonin Scalia and Clarence Thomas would have sided with the state.

The ruling came in a lawsuit filed last month by the American Civil Liberties Union on behalf of two lesbian couples denied marriage licenses.

The legal situation was complicated in Kansas because state Attorney General Derek Schmidt filed his own case with the Kansas Supreme Court, seeking to block marriage licenses for gay couples. The Kansas court blocked further licenses while it reviewed the case and its order is still in effect, making it unclear how the U.S. Supreme Court's decision Wednesday will be applied in individual counties.

Aides to Schmidt did not immediately return telephone and email messages seeking comment. A spokeswoman for Republican Gov. Sam Brownback, a strong supporter of the gay marriage ban, did not respond immediately.

The U.S. Supreme Court's decision in the Kansas case came the same day a federal judge struck down South Carolina's same-sex marriage ban as unconstitutional, opening the door to such marriages but also giving the state a week to appeal. The attorney general said he would do so immediately.

U.S. District Judge Richard Gergel, ruling in the case of a same-sex couple from Charleston who sued to be married, found South Carolina's state constitutional ban "invalid as a matter of law."