Bernie Sanders picked on Hillary Rodham Clinton’s stand on several liberal issues at the Iowa Democratic fundraiser late Saturday, implicitly criticizing her delayed opposition to the Trans-Pacific partnership as well as her vote in favor of the Iraq war.

Sanders reportedly noted that Clinton had lagged behind on a number of issues and said in his prepared remarks before thousands of applauding Democrats -- “I promise you tonight as your president I will govern based on principle not poll numbers.”

Sanders, who has gained on Democratic front-runner Clinton in recent polls, reminded the crowd of the “difficult choices” he has made in his early support of same-sex marriages and his opposition of the Iraq war. 

“It gives me no joy to say that I was largely right about the war,” he said, adding: “I am proud to tell you when I came to that fork in the road I took the right road even though it was not the popular road at the time.” Clinton as a U.S. senator from New York voted in 2002 in favor of the Iraq invasion.

The independent senator from Vermont went on to compare himself with President Barack Obama in his speech, according to reports. “Eight years ago the experts talked about how another Democratic candidate for president, Barack Obama, couldn’t win. How he was unelectable. Well Iowa, I think we’re going to prove the pundits wrong again. I believe we will make history,” he said.

The annual dinner, one of the most important events of the Democratic primary season, was a largely genial affair in which candidates complimented each other and disagreed on specifics of policies, Reuters reported.

Clinton did not respond to Sander's charge, and instead chose to focus on how to take on the Republicans, according to the Associated Press. "I hear Donald Trump when he says we have to make America great again," Clinton said at the dinner. "America is great -- we just have to make it fair and just."

Clinton and Sanders are the top Democratic presidential hopefuls -- a list that was effectively reduced to two after Vice President Joe Biden announced Wednesday he would not seek nomination.

Clinton leads Sanders among likely Democratic Caucus participants by a margin of 51 percent to 40 percent, according to a Quinnipiac University, Connecticut, poll released Friday.