In one of the more dramatic salvos of the first Democratic presidential debate on Tuesday, Martin O’Malley took a swipe at Bernie Sanders, claiming that the Vermont senator “panders to the NRA.”

O’Malley reiterated his opposition to the National Rifle Association toward the end of the debate. Asked which political enemy he is most proud of making, the former Maryland governor  declared proudly: the NRA.

And yet O’Malley accepted $40,000 from the NRA in 2012 as the chair of a national political committee, disclosures show.

The fundraising took place while O’Malley served as the chairman of Democratic Governors Association, a nonprofit group designed to help elect Democrats win statehouses. O’Malley led the DGA as its top fundraiser and was retained as finance chair following his term as chair.

The DGA disclosure is below:

The exchange about gun policy at Tuesday’s debate started when Hillary Clinton said that Sanders’ support for a bill to provide liability protection for gun manufacturers revealed that his position on gun control is insufficiently strong.

“As a senator from a rural state, I can tell Secretary Clinton that all the shouting in the world … is not going to keep guns out of the hands of people who should not have guns,” Sanders retorted. He defended his record of supporting increased mental health care and background checks for gun purchases as a consensus approach that takes into account rural concerns about gun control.

O’Malley said that as governor of Maryland, he signed gun control legislation “by leading with principle, not pandering to the NRA.”

In June, a Super PAC controlled by O’Malley’s former aides launched its first attack ad of the campaign cycle. The ads only mentioned Sanders, assailing the senator as “no progressive when it comes to guns.”

View the exchange below: