CHICAGO — Federal appeals judges bristled on Tuesday at arguments defending bans on same-sex marriage in Indiana and Wisconsin, with one Republican appointee comparing them to laws, now defunct, that once outlawed weddings between blacks and whites.

Often-blistering questions by a three-judge panel of the United States Court of Appeals for the Seventh Circuit, in Chicago, for defenders of the bans on same-sex marriage could be a signal that the laws may be in trouble — at least at this step in the legal process.

Judge Richard A. Posner, who was appointed by President Ronald Reagan in 1981, hit the backers of the ban the hardest. He balked when the Wisconsin assistant attorney general, Timothy C. Samuelson, repeatedly pointed to tradition as the underlying justification for barring gay marriage.

Judge Posner said, “It was tradition to not allow blacks and whites to marry — a tradition that got swept away.” Prohibition of same-sex marriage, he said, derives from “a tradition of hate” and “savage discrimination” of gays.