A judge in Louisiana on Wednesday delivered the first federal ruling against same-sex marriage rights since key portions of the Defense of Marriage Act were struck down by the supreme court in 2013.

The ruling breaks a string of 21 court victories for the gay rights movement, since the Doma decision.

Declaring Louisiana's ban on same-sex marriage constitutional, Judge Martin LC Feldman ruled that the state had a "legitimate interest under a rational basis", for "addressing the meaning of marriage through the democratic process". Louisiana law bans same-sex marriage and does not recognise same-sex marriages performed elsewhere.

Feldman rejected due process, equal protection and free speech claims in a lawsuit against state attorney general James D Caldwell. The case, Robicheaux v Caldwell, was brought by two couples: Derek Penton and Jon Robicheaux, and Courtney and Nadine Blanchard.

In his ruling, the judge said be believed that the state of Louisiana "has a legitimate interest … in linking children to an intact family formed by their two biological parents, as specifically underscored by Justice Kennedy in Windsor," referring to the US supreme court case that struck down key portions of Doma.

In one portion of the decision, Feldman asked whether a decision in favor of same-sex marriage would result in "unintended consequences", such as familial incest.

When a federal court is obliged to confront a constitutional struggle over what is marriage … the consequence of outcomes, intended or otherwise, seems an equally compelling part of the equation. And so, inconvenient questions persist. For example, must the states permit or recognise a marriage between an aunt and niece? Aunt and nephew? Brother/brother? Father and child? May minor marry? Must marriage be limited to only two people? What about a transgender spouse? Is such a union same-gender or male-female? All such unions would undeniably be equally committed to love and caring for one another, just like the plaintiffs.

Feldman relied on dissenting opinions from judges in federal trial and appeals courts, including from Judge Paul V Niemeyer, who in July dissented in a three-judge decision to strike down Virginia's same-sex marriage ban.

"If given the choice, some states will surely recognize same-sex marriage and some will surely not," Niemeyer wrote, and Feldman quoted. "But that is, to be sure, the beauty of federalism."

Members of the movement to legalise gay marriage nationally said they were undeterred.

"Today a federal district court put up a roadblock on a path constructed by 21 federal court rulings over the last year – a path that inevitably leads to nationwide marriage equality," said Sarah Warbelow, legal director for the Human Rights Campaign. "We firmly believe that justice will ultimately be done."

Both Feldman and Warbelow point out that the issue of same-sex marriage will likely go to the US supreme court sooner than later.

Across the country, there are 70 court cases challenging marriage bans in 30 states, and the American territory of Puerto Rico. Cases from 11 states are pending before federal appeals courts, according to Human Rights Campaign.

Opponents of gay marriage commended Feldman's decision.

"This ruling is a victory for children, each of whom need and desire a mom and dad, something our public policy should encourage," said Tony Perkins, president of the Family Research Council and former Louisiana legislator. "This decision is a victory for the rule law, and for religious liberty and free speech which are undermined anywhere marriage is redefined."

Before this ruling, Feldman was probably best known for striking down an offshore drilling moratorium off the Louisiana coast following the BP oil spill in the Gulf of Mexico, the worst in history. Environmentalists were incensed when it was revealed that Feldman had more than one kind of stock in offshore drilling and gas exploration. The judge, who is 80, is a 1983 Reagan appointee.

Feldman is also serving a seven-year term on the Foreign Intelligence Surveillance Court, called the Fisa court. It reviews applications for secretive government surveillance, such as programs run by the NSA.

Local courts in at least three southern states – Florida, Mississippi and Tennessee – have also effectively upheld bans on gay marriage. All the cases sought to dissolve marriages of same-sex couples who were married in other states, and wished to be divorced in states with same-sex marriage bans.