Donald Trump has said repeatedly during the campaign that President Obama "founded ISIS," a remark that has come under scrutiny in recent days.

"He's the founder of ISIS. He's the founder of ISIS. He's the founder. He founded ISIS," Trump said at a Wednesday rally.

Trump has cited the conservative critique of President Obama's Iraq policy — that the withdrawal of troops in 2011 led to a power vacuum that allowed ISIS to flourish — in making the claim.

"He was the founder of ISIS, absolutely," Trump said on CNBC on Thursday. "The way he removed our troops — you shouldn't have gone in. I was against the war in Iraq. Totally against it." (Trump was not against the war as he has repeatedly claimed.) "The way he got out of Iraq was that that was the founding of ISIS, OK?" Trump later said.

But lost in Trump's immediate comments is that, for years, he pushed passionately and forcefully for the same immediate troop withdrawal from Iraq. In interview after interview in the later 2000s, Trump said American forces should be removed from Iraq.

"First, I'd get out of Iraq right now," Trump said to British GQ in a 2008 interview. "And by the way, I am the greatest hawk who ever lived, a far greater hawk even than Bush. I am the most militant military human being who ever lived. I'd rebuild our military arsenal, and make sure we had the finest weapons in the world. Because countries such as Russia have no respect for us, they laugh at us. Look at what happened in Georgia, a place we were supposed to be protecting."

Later, Trump said he wished Arizona Sen. John McCain, whom he was backing in the election, had supported pulling troops out of Iraq faster.

"I wish he would promise to get us out of Iraq faster," said Trump. "I am not in love with that aspect of what he represents."

Those comments echoed similar remarks in March 2007 when he said forces should be immediately withdrawn from Iraq.

"You know how they get out? They get out," Trump said to CNN's Wolf Blitzer. "That's how they get out. Declare victory and leave, because I'll tell you, this country is just going to get further bogged down. They're in a civil war over there, Wolf. There's nothing that we're going to be able to do with a civil war. They are in a major civil war."

Speaking with Howard Stern in October of that year, Trump said McCain's support for keeping troops in Iraq was costing him the Republican nomination.

"Anybody who stays in Iraq — look at what happened to McCain — he want to show how tough he is, he's sunk, immediately, and that's with the Republicans."

By late 2011, Trump notoriously began saying the U.S. should take Iraq's oil before withdrawing. Trump also told CNN's Piers Morgan in February of that year he would get of troops in Iraq "out real fast." By 2016, he completely adopted the conservative critique of the Iraq withdrawal.

Andrew Kaczynski is a political reporter for BuzzFeed News and is based in New York.