Democratic presidential candidate Bernie Sanders on Sunday said that he disagreed with Hillary Rodham Clinton's “explanation” of why former President Bill Clinton signed the Defense of Marriage Act (DOMA).

Appearing on CNN's State of the Union, Sanders challenged remarks Clinton made on passage of DOMA, which prohibited federal agencies from recognizing the legal marriages of gay and lesbian couples. The Supreme Court in 2013 struck down a key provision of DOMA.

On Friday, Hillary Clinton said that her husband signed the law as a “defensive action” to prevent passage of an amendment to the U.S. Constitution which would ban gay marriage.

(Related: Hillary Clinton explains DOMA, DADT; Says they were “defensive actions.”)

During Sunday's interview, State of the Union host Jake Tapper noted that Sanders had “sharply contrasted” his record with that of Clinton's during an Iowa campaign stop.

“You voted against the Defense of Marriage Act. Hillary Clinton is calling it a defensive action. Last night you said some are trying to rewrite history,” Tapper said.

“Well, I think the history on that is pretty clear. The Republicans came into Congress, many of them, I'm sorry to have to say, were homophobic,” responded Sanders, an independent senator from Vermont. “And what they were trying to do is make it impossible for gay couples to be married, to get benefits from the federal government.”

Sanders, as a member of the House in 1996, voted against passage of DOMA.

“I thought then – and I think now – that people have the right to love those folks that they want to love and get married regardless of their sexual orientation,” he said. “It was not an easy vote, but that was the issue.”

Tapper pressed: “[Clinton] said that it was done as a way of being defensive, to protect gay rights.”

“I would not agree with that assertion,” Sanders replied. “To my mind, I think the evidence is very, very clear that that legislation was anti-gay legislation, it was playing off the fears of a lot of Americans.”

“Now the good news – as Hillary Clinton just indicated – the culture has changed radically. We have become a far less discriminatory society. Gay rights and gay marriage is now legal in 50 states in this country. We should be very, very proud of it. We've come a long, long way since that vote in 1996,” he added.