Democratic presidential candidate Bernie Sanders speaks at a town hall campaign event at Grinnell College in Grinnell, Iowa, on Jan. 25, 2016. (Reuers/Mark Kauzlarich)

BURLINGTON, Iowa -- Democratic presidential hopeful Bernie Sanders on Thursday ratcheted up his criticism of Hillary Clinton, suggesting she had bent to the political winds on a series of key issues, including the Iraq war, same-sex marriage, trade agreements and proposed oil pipeline.

“It is great to be against the war after you vote for the war,” the Vermont senator said sarcastically during a campaign stop here.

He was referring to Clinton’s 2002 vote as a senator from New York to authorize the use of force in Iraq, a vote she later characterized as a mistake.

Iraq was just one of several issues on which Sanders said he had been “boringly consistent.” With the Iowa caucuses just four days off, he urged an enthusiastic crowd of more than 800 people to “check the record” and “find out where my opponent was.”

Besides highlighting his own opposition to the Iraq war, Sanders touted his vote against the Defense of Marriage Act, a measure signed into law in 1996, when Bill Clinton was in the White House and Sanders was a member of the House of Representatives.

The law defined marriage for federal purposes as between one man and one woman and allowed states to refuse to recognize same-sex unions granted under the laws of other states.

“It is great to be for gay rights after you insult the entire gay community by supporting DOMA,” Sanders said.

Hillary Clinton, who was first lady at the time, argued in a television interview last fall that her husband had signed the law as a “defensive action” to shut down momentum at the time toward writing a ban of same-sex marriages into the U.S. Constitution.

While many gay-rights activists have disputed that interpretation, Hillary Clinton was recently endorsed by the Human Rights Campaign, the nation’s largest gay-rights lobby, for the Democratic nomination.

Sanders also pointed to his history of opposing trade agreements, including the Trans-Pacific Partnership, a deal being pushed by President Obama that Clinton spoke out against months after Sanders announced his position.

“It is great to finally come out kicking and screaming against the TPP, but where were you on all the other trade agreements?” Sanders asked.

He also chided Clinton for her relatively late opposition to the proposed Keystone XL oil pipeline, saying “it is great to come out against the Keystone pipeline after supporting the Keystone pipeline.”

Sanders said that he, by contrast, had been steady on those and other issues over the years.

“I have stood on the side of working families, and I have taken on the big money interests time after time after time,” he said. “What leadership means is not simply following the majority.”

Sanders’s stepped-up critique of Clinton comes amid what polls have indicated is a neck-and-neck race between the two heading into Monday’s first-in-the-nation caucuses in Iowa.

Later in his remarks here, Sanders said he was determined to continue running a race based on the issues. Despite frequent goading by reporters, he said, he has refused to criticize Clinton over the controversy stemming from her use of a private email server while secretary of state or to weigh in on President Clinton’s personal behavior.