A state judge overturned Missouri's constitutional ban on gay marriage Wednesday in a ruling that immediately set off a rush among some same-sex couples to apply for marriage licenses.

St. Louis Circuit Judge Rex Burlison said in a written ruling that Missouri's measure recognizing marriage only between a man and woman violates the due process and equal protection rights of the U.S. Constitution. The decision mirrored ones handed down recently in several other states.

Missouri Attorney General Chris Koster immediately appealed the ruling to the state Supreme Court, saying the constitutional challenge "must be presented to and resolved" at that level. But he said that his office wouldn't seek a stay of the order, noting that the U.S. Supreme Court refused to grant stays after same-sex marriage decisions in Idaho and Alaska.

Koster previously chose not to appeal a recent ruling requiring Missouri to recognize same-sex marriages performed in other states.

After hearing about Wednesday's ruling, Kelley Harris and Kelly Barnard drove immediately to St. Louis recorder of deed's office at City Hall to apply for a marriage license. They called a photographer to record the event and planned to invite friends to attend an impromptu ceremony at a local park. The couple had held an unofficial wedding ceremony in 2003.

"We've already been living as a married couple — we have children, we have family — so it would be nice to have the legal backing," said Harris, accompanied by her mother and the couple's 4-year-old son and 6-year-old daughter.

Shortly before 5 p.m., the city had issued marriage licenses to four lesbian couples, including Harris and Barnard.

The city of St. Louis issued four marriage licenses to same-sex couples in June and then quit doing so, intentionally setting up a legal challenge to the state's 2004 constitutional amendment banning gay marriage. Assistant Attorney General Jeremiah Morgan argued during a September court hearing that 71 percent of Missourians had voted for the referendum and said that the U.S. Supreme Court has repeatedly allowed states to define marriage.

St. Louis City Counselor Winston Calvert countered that the existing law treats same-sex couples as "second-class citizens." He said an increasing number of states are allowing gay couples to wed, including most of the states surrounding Missouri.

"Obviously this is a long time coming for so many gay and lesbian couples in the state of Missouri and the city of St. Louis in particular," Calvert said Wednesday.

Terry Garrett-Yampolsky, an archivist in the St. Louis recorder of deeds office, was part of the initial group of same-sex couples to receive licenses a little more than three months ago. He watched the couples enter the city office Wednesday with a mixture of pride and exhilaration.

"I'm overwhelmed," he said. "It's actually happening."

The decision could also lead to same-sex marriage licenses being issued in other Missouri communities. Cheryl Dawson, the recorder of deeds for Greene County in southwest Missouri, said she received one phone inquiry about same-sex marriage licenses after the ruling. She said she told the caller that a state association hadn't yet told her how to handle such requests.

An official with the Recorders' Association of Missouri didn't immediately return a phone call late Wednesday afternoon.

A federal court case in Kansas City also challenges Missouri's gay marriage ban.

The lawsuits in Missouri mirror dozens of others across the country that argue state bans on gay marriage violate the due process and equal protection rights of same-sex couples. The suits are based on the same arguments that led the U.S. Supreme Court last year to overturn part of the federal Defense of Marriage Act that denied a range of tax, health and veterans benefits to legally married gay couples.

Gay marriage is legal in 32 states and the District of Columbia, and bans in other states face legal challenges.