By KEN THOMAS and CATHERINE LUCEY
DES MOINES, Iowa (AP) – Hillary Rodham Clinton and Bernie Sanders dueled for support among thousands of Iowa Democrats on Saturday, seeking an edge at a high-profile fundraising dinner that could set the tone for the leadoff presidential caucuses in February.

Sanders, the independent Vermont senator, used his speech to draw sharp contrasts with Clinton on a number of issues, implicitly criticizing her delayed opposition to the Trans-Pacific Partnership and Keystone XL pipeline as well as her vote in favor of the Iraq war.

Without naming Clinton, he pointedly criticized the passage of the Defense of Marriage Act during Bill Clinton’s administration, saying in prepared remarks, “some are trying to rewrite history by saying they voted for one anti-gay law to stop something worse. Let us be clear. That’s just not true.” Hillary Clinton said in an interview with MSNBC on Friday that the law was signed as a “defensive action.”

“I will govern based on principle not poll numbers,” Sanders said. “I pledge to you that every day I will fight for the public interest not the corporate interests.” He vowed “not to abandon any segment of American society, whether you’re gay or black or Latino or poor or working class,  just because it is politically expedient at a given time.”

Clinton and Sanders sit atop a Democratic presidential field that has effectively pared down to a two-person race for the nomination after Vice President Joe Biden announced this week he would not seek the White House.

Former Maryland Gov. Martin O’Malley, who trails both by a wide margin, was reaching for a breakout performance at the dinner. Both Clinton and O’Malley were speaking later Saturday.

One hundred days remain before Iowa’s leadoff presidential caucuses, and the state Democratic party’s annual Jefferson-Jackson dinner drew a raucous crowd of more than 6,000 activists in what traditionally serves as a kickoff to the Iowa caucuses.

It capped a daylong pageant of political activities: Former President Bill Clinton headlined his first rally of the campaign, introducing pop singer Katy Perry at a free concert for Clinton’s faithful. Sanders led cheering supporters across a Des Moines bridge in a march that included chants of “Hey, hey, ho, ho, the oligarchy has to go!”

Clinton’s campaign has been on an upswing this month. She received a boost from Vice President Joe Biden’s decision not to run, then put together a grinding, competent appearance before a Republican-led congressional committee probing the deadly 2012 attacks on diplomatic outposts in Benghazi, Libya.

Two lesser-known rivals, Jim Webb and Lincoln Chafee, abandoned the race following Clinton’s strong performance on Oct. 13 in the first primary debate.

The dinner, called the “J-J,” was an important showcase for Sanders, a Vermont independent who has drawn large crowds with his calls for a “political revolution” to address the gap between the wealthy and the poor.