(CNN) -- A Missouri judge has overturned the state's ban on same-sex marriages and ordered registrars to start issuing licenses to gay and lesbian couples.
In a ruling Wednesday, Judge Rex Burlison struck down the ban, declaring it unconstitutional and saying officials should give licenses to same-sex couples seeking to get married.
"Any same-sex couple that satisfies all the requirements for marriage under Missouri law, other than being of different sexes, is legally entitled to a marriage license," wrote Burlison, a St. Louis circuit judge.
Shortly after the ruling, couples marched to St. Louis City Hall to apply for licenses, CNN affiliate KSDK reported.
The ruling follows an incident in June, when St. Louis issued marriage licenses to four same-sex couples. The state attorney general sued to stop it, arguing it defies Missouri's 2004 constitutional amendment banning gay marriage.
St. Louis Mayor Francis Slay said times have changed, and the ban was long overdue.
"When you have two people who love each other and want to commit to each other through marriage, I can't think of anything more beautiful," he said. "Whether you are heterosexual, it shouldn't matter. We are all people under the law, and we should all be treated equally."
Slay said his brother, who is gay, just married his partner in New York.
"They could not get married in St. Louis," he told the affiliate. "Based on what is happening here, he may move back to St. Louis."
But the state's top prosecutor said he has appealed the ruling to the Missouri Supreme Court.
"The constitutional challenge to Missouri's historically recognized right to define marriage must be presented to and resolved by the state's highest court," state Attorney General Chris Koster said in a statement.
Koster has said that while a lot of state residents have changed their minds and support marriage equality, the constitution has not changed.
More than 30 states and the District of Columbia allow marriage for same-sex couples.
CNN's AnneClaire Stapleton contributed to this report