(CNN) -- Months after ruling that Kentucky must recognize same-sex marriages performed in other states, a federal judge decided Tuesday that the state must conduct them as well.
U.S. District Judge John G. Heyburn II on Tuesday ruled that Kentucky's same-sex marriage ban is unconstitutional, saying it violates the U.S. Constitution's guarantee of equal protection under the law.
Heyburn's decision -- like his earlier one -- will not go into immediate effect at least until the 6th Circuit Court of Appeals rules on the matter. The state appealed the first case, and Kentucky's governor indicated Tuesday the state also will appeal the latest ruling.
Heyburn ruled Thursday in a case brought by two same-sex couples who argued the state's law violated their rights.
"Ultimately, Kentucky's laws banning same-sex marriage cannot withstand constitutional review," Heyburn wrote in a 19-page opinion.
He cited in part the Supreme Court's decision last year to strike down a federal law known as the Defense of Marriage Act, which had denied legally married same-sex couples the same federal benefits, including tax breaks, available to heterosexual couples.
"Assuring equal protection for same-sex couples does not diminish the freedom of others to any degree," Heyburn wrote.
The office of Kentucky Gov. Steven Beshear said the state would appeal Tuesday's ruling, like Heyburn's earlier decision, "so that the matter is fully before the 6th Circuit."
In February, Heyburn ruled that Kentucky's refusal to recognize out-of-state same-sex marriages violates the 14th Amendment's equal protection clause, the same rationale he used Tuesday,
Beshear, a Democrat, hired outside lawyers to defend the out-of-state ban, after his attorney general tearfully refused in March to take part in any further legal challenges.
Beshear contended that "Kentucky should be part of this process" until the Supreme Court weighs in.
Laura Landenwich, the lead attorney for the plaintiffs in Tuesday's case, said her clients were elated but still "looking forward to that day when they can wed."
"We regret that the commonwealth will spend more money on this appeal at certainly an unnecessary taxpayers' expense, but we're glad that (Beshear has) already made the decision so we can continue to fight," she said.
With dozens of cases working their way through the court systems, more district judges could issue their own decisions affecting yet more states until the Supreme Court weighs in further.
Same-sex marriage is legal in the District of Columbia and 19 states: California, Connecticut, Delaware, Hawaii, Illinois, Iowa, Maine, Maryland, Massachusetts, Minnesota, New Hampshire, New Jersey, New Mexico, New York, Oregon, Pennsylvania, Rhode Island, Vermont and Washington. Massachusetts was the first to make it legal, in 2004.
Worldwide, 16 countries -- and parts of Mexico -- also have laws allowing same-sex marriage and domestic partnerships. Most of the nations are in Europe and South America.
CNN's Bill Mears and Greg Botelho contributed to this report.