A federal judge in Louisiana bucked a national trend and ruled Wednesday that the state has the right to ban same-sex couples from marrying.

The decision by Judge Martin L.C. Feldman is the first in which a federal district judge has upheld a state ban since the Supreme Court knocked down part of the federal Defense of Marriage Act in June 2013.

“It would no doubt be celebrated to be in the company of the near-unanimity of the many other federal courts that have spoken to this pressing issue, if this court were confident in the belief that those cases provide a correct guide,” Feldman wrote. “Clearly, many other courts will have an opportunity to take up the issue of same-sex marriage; courts of appeals and, at some point, the U.S. Supreme Court. The decision of this court is but one studied decision among many.”

More than 20 federal courts have ruled in favor of advocates of same-sex marriage. Panels of the U.S. Court of Appeals for the 10th and 4th circuits are the highest courts to strike down state bans, in Utah, Oklahoma and Virginia.

Both the winning and losing sides in those appellate cases have asked the Supreme Court to rule definitively on whether the U.S. Constitution extends the fundamental right of marriage to same-sex couples. The justices could make a decision on whether to accept the cases as early as this month.

Same-sex marriage status in the U.S., state-by-state

Feldman, nominated to the bench in 1983 by President Ronald Reagan, said Louisiana needed to show only that there was a rational reason for voters to limit marriage to a man and a woman.

“This court is persuaded that Louisiana has a legitimate interest . . . whether obsolete in the opinion of some, or not, in the opinion of others . . . in linking children to an intact family formed by their two biological parents,” Feldman wrote.

He added: “The court is persuaded that a meaning of what is marriage that has endured in history for thousands of years, and prevails in a majority of states today, is not universally irrational on the constitutional grid.”

The Supreme Court’s DOMA decision, U.S. v. Windsor , struck down the federal definition of marriage as only between a man and a woman and said the federal government could not withhold recognition of same-sex marriages performed in states where they are legal — now 19 states and the District of Columbia.

But the justices did not reach the issue of whether states are free to deny marriage licenses to same-sex couples.

All federal courts that have ruled since — except for Feldman’s — have said the Supreme Court’s reasoning in Windsor nevertheless means that the right to marriage may not be withheld from gay couples.

“But Windsor does little more than give both sides in this case something to hope for,” Feldman wrote.

He said that because the Supreme Court has never recognized gays as a class to be specially protected from discrimination, Louisiana only had to show a rational reason for excluding them from obtaining marriage licenses. He said the state had a legitimate interest in limiting marriage to couples who could biologically have a child.

And he said that while marriage is a fundamental right, it has not traditionally been seen as a right extended to same-sex couples. Legislatures might be free to do that, he said, but not judges.

Feldman said he had “arduously studied” the rulings by other courts and concluded that they “thus far exemplify a pageant of empathy; decisions impelled by a response of innate pathos.” He said the courts “appear to have assumed the mantle of a legislative body.”

He added: “This national same-sex marriage struggle animates a clash between convictions regarding the value of state decisions reached by way of the democratic process as contrasted with personal, genuine, and sincere lifestyle choices recognition.”