ST. LOUIS — A judge overturned Missouri’s ban on gay marriage on Wednesday in a ruling that could add the state to a growing list of those where same-sex marriages are legal.

St. Louis Circuit Judge Rex Burlison, who heard arguments on Sept. 29, determined the law is unconstitutional.

The city of St. Louis issued a handful of marriage licenses to same-sex couples in June, setting up a court case over the state’s 2004 constitutional amendment banning gay marriage. Meanwhile, a federal judge on Tuesday ordered Kansas to allow same-sex couples to marry pending the outcome of a lawsuit challenging the state’s ban, but he delayed enforcement of his order until next week to give the state time to appeal.

U.S. District Judge Daniel Crabtree issued a preliminary injunction barring Kansas from enforcing its same-sex marriage ban as of 5 p.m. next Tuesday, pending the outcome of an American Civil Liberties Union lawsuit challenging it.

“This is a great day for marriage equality in Kansas and for gay and lesbian couples, because now they can do what straight people have been able to do forever: They can get married,” said Doug Bonney, legal director of the ACLU’s Kansas chapter.

In St. Louis, Assistant Attorney General Jeremiah Morgan argued that 71 percent of Missourians voted for the referendum defining marriage as between a man and a woman, and he said the U.S. Supreme Court has time and again allowed states to define marriage.

But 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.

St. Louis officials issued only the four licenses, intentionally allowing the courts to settle the debate. It wasn’t immediately clear if or when St. Louis or other jurisdictions in the state would begin granting licenses to same-sex couples.

It was the second defeat for Missouri gay marriage opponents in recent months. Earlier, in Kansas City, Jackson County Circuit Judge J. Dale Youngs ordered the state to recognize same-sex marriages legally performed in other states. That order allowed married gay couples to be eligible to sign up for a wide range of tax, health insurance, veterans and other benefits now afforded to opposite-sex married couples.

Missouri Attorney General Chris Koster has said he won’t appeal the Kansas City ruling, stating: “Missouri’s future will be one of inclusion, not exclusion.”

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 Supreme Court last year to overturn part of the federal Defense of Marriage Act that denied a range of benefits to legally married gay couples.