CHICAGO -- A U.S. appeals court in Chicago ruled Thursday that gay marriage bans in Wisconsin and Indiana violate the U.S. Constitution -- thereby bumping the number of states where gay marriage will be legal from 19 to 21.

The unanimous decision by the three-judge panel of the U.S. 7th Circuit Court of Appeals is yet another in a series of courtroom wins for gay-marriage advocates. Since last year, the vast majority of federal rulings have declared same-sex marriages bans unconstitutional.

The ruling comes just a day after a federal judge in New Orleans upheld Louisiana's ban on gay marriage. The ruling by U.S. District Judge Martin Feldman ended a streak of more than 20 federal court victories for same-sex marriage couples.

The Wisconsin and Indiana cases shifted to Chicago after attorneys general in the states appealed separate lower court rulings in June that tossed the bans. The 7th Circuit stayed those rulings pending its own decision on the cases, which were considered simultaneously.

Between the bans being struck down and the order restating them as the appeals process ran its course, hundreds of gay couple in both states rushed to marry. Those marriages could have been jeopardized had the 7th Circuit restored the bans.

During arguments before the appellate court in August, Republican appointee Judge Richard Posner likened same-sex marriage bans to now-defunct laws that once outlawed interracial marriage. They derived from "hate" and "savage discrimination" of gays, he said.

But states argued that the prohibitions helped foster a centuries-old tradition of marriage between men and women, and that the regulation of the institution of marriage was a tool for society to attempt to prevent pregnancies out of wedlock.

A constitutional amendment approved in 2006 by voters banned gay marriage in Wisconsin, while state law prohibited it in Indiana. Neither state recognized same-sex marriages performed in others states.

In court filings, attorneys representing Wisconsin and Indiana argued that nothing in the U.S. Constitution prevented them from implementing and enforcing the bans. Gay-marriage advocates said they violated equal protection guarantees.

In addition to Posner -- whom Ronald Reagan appointed in 1981 -- the judges on the 7th Circuit panel included 2009 Barack Obama appointee David Hamilton and Ann Claire Williams, a 1999 Bill Clinton appointee.

The states could now appeal to the U.S. Supreme Court, but there's no guarantee the high court would agree to take up their cases.

The sharply critical tone struck by Posner and other judges about the bans during oral arguments on Aug. 26 suggested the panel leaned in favor of the pro-gay marriage side.

Judge Posner at times expressed annoyance with Wisconsin Assistant Attorney General Timothy Samuelson as he repeatedly cited tradition as the underlying justification for barring gay marriage.

Posner also ran through a list of psychological strains children of unmarried same-sex couples suffered, including having to account to classmates why their parents were not married.

Pro-gay marriage lawyers did struggle to answer questions about where they would draw the line between who could and couldn't marry -- and why. Hamilton noted that advocates of overturning bans on polygamy have made similar arguments to ones gay marriage advocates are making, including that children who acknowledge several moms or dads suffer when their multiple parents can't marry.