Same-sex marriage is legal in 19 states and the District of Columbia. Bans that have been overturned in some other states continue to make their way through the courts. Since last year, the vast majority of federal rulings have declared same-sex marriages bans unconstitutional.
Wisconsin Attorney General J.B Van Hollen said he would appeal Thursday's ruling to the U.S. Supreme Court.
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 reinstating 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.
By standards of the 7th Circuit, the decision was unusually fast coming just nine days after oral arguments suggesting unanimity came easily to the panel.
Judge Richard Posner, an appointee of Repubican President Ronald Reagan in 1981, wrote Thursday's opinion for the panel. During oral arguments, it was Posner who fired the toughest questions at defenders of the bans, often expressing exasperation at their answers.
The ruling echoes his comments during oral arguments that "hate" underpinned the gay-marriage bans, saying, "Homosexuals are among the most stigmatized misunderstood, and discriminated-against minorities in the history of the world."
The 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.
Thursday's opinion went back to that issue repeatedly, noting that some traditions, such as shaking hands or men wearing ties, may "seem silly" but "are at least harmless."
That, though, is not the case when it comes to gay-marriage bans, the court said.
"If no social benefit is conferred by a tradition and it is written into law and it discriminates against a number of people and does them harm beyond just offending them, it is not just a harmless anachronism; it is a violation of the equal protection clause," the opinion says.
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 other 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.
Though Wisconsin says it will appeal, there's no guarantee that the U.S Supreme Court will take up the case.
But the threat prompted Scott McDonnell, the Dane County Clerk in Madison, Wisconsin, who had married gay couples after that state's law was initially struck down by a federal judge, to say he wouldn't resume marrying same-sex couples.
"We're in a little bit of a holding pattern for a couple weeks," McDonnell said.