Democratic presidential contender Hillary Clinton said rival Bernie Sanders “flip-flopped” on a gun control position in an attack on her rival ahead of the Democratic debate Sunday night.

Sanders said he’d support a bill that would allow gun manufacturers to be held liable in lawsuits, which would reverse a 2005 law that he supported.

“He flip-flopped last night,” Clinton said on ABC’s “This Week with George Stephanopoulos.” “I’m delighted he had a change of heart.”

Sanders defended his record on gun control.

“I’m not going to be on the defensive on that issue,” he said on NBC’s “Meet the Press.” “I lost an election in 1988, probably lost an election because I had the courage back then to say that assault weapons should not be sold in America.”

Clinton also said that Sanders should support closing a “loophole” that allows gun purchases to go through if background checks are taking longer than three days. She linked the issue to the shooting in a church in South Carolina last year where nine people were killed. “It was how the killer in Charleston got his gun,” she said.

advertisement | advertise on newsday

Sanders, asked about the criticism by “Meet the Press” host Chuck Todd, said: “I hope we don’t have to politicize that event.”

The Democratic debate, which also includes former Maryland Gov. Martin O’Malley, airs live from South Carolina from 9 to 11 p.m. on NBC.