CHARLESTON, S.C. (TheBlaze/AP) — Democratic Sen. Bernie Sanders is announcing his support for legislation that would reverse a 2005 law granting gun manufacturers legal immunity that he once supported.

In this Jan. 14, 2016 file photo, Democratic presidential candidate, Sen. Bernie Sanders, I-Vt, speaks in Hanover, N.H. There was a time when Democrats fretted about Hillary Clinton’s presidential campaign becoming a coronation, leaving her without the tests of a primary season to prepare for a general election matchup against the Republican nominee. In the past two weeks, the race for the Democratic Party’s 2016 presidential nomination has evolved from relatively civil disagreement over policy into a contentious winter competition between Clinton and Bernie Sanders, the independent senator from Vermont. (AP Photo/John Minchillo, File)

Democratic presidential candidate Sen. Bernie Sanders, I-Vt (AP Photo/John Minchillo, File)

His changed position, announced on the eve of Sunday’s Democratic debate, comes after days of attacks from rival Hillary Clinton.

Clinton has used Sanders’ earlier vote to undercut his liberal image. She says guns are a major difference between them, and her campaign casts Sanders’ new support as a reversal, with chairman John Podesta calling it a “debate-eve conversion” on Twitter:

Sanders aides say the decision is not a flip-flop, arguing that he backed the 2005 law because of provisions that require child safety locks on guns and ban armor-piercing ammunition.

The two candidates are speaking at a dinner for the South Carolina Democratic Party.