WASHINGTON -- President Barack Obama is "directly responsible" for the Orlando, Florida, massacre, Sen. John McCain (R-Ariz.) charged Thursday.

McCain, one of the Senate's most hawkish members and long a vigorous advocate of military intervention in the Middle East, said Obama was at fault because he pulled troops from Iraq too soon and failed to respond more vigorously to the rise of the so-called Islamic State, according to The Associated Press and numerous reporters who were listening.

“Barack Obama is directly responsible for it, because when he pulled everybody out of Iraq, al Qaeda went to Syria, became ISIS, and ISIS is what it is today thanks to Barack Obama’s failures,” McCain said, according to The Washington Post.

McCAIN: Obama is 'directly responsible' for Orlando because he pulled troops from Iraq, bungled Syria — Mike DeBonis (@mikedebonis) June 16, 2016

McCain quickly tried to soften his criticism, taking to Twitter soon after his comments were reported to say he was blaming Obama's policies, not the president himself.

To clarify, I was referring to Pres Obama’s national security decisions that have led to rise of #ISIL, not to the President himself — John McCain (@SenJohnMcCain) June 16, 2016

McCain also released a longer statement on his website saying, "I misspoke," although he did not apologize or withdraw the claim that Obama was responsible for creating the conditions that inspired Omar Mateen to buy an assault-style weapon and go on a hate-fueled shooting spree.

McCain has long blamed Obama for the quagmire in the Middle East while ignoring the previous president's rush to war in Iraq, which set off the conflicts that gave birth in 2004 to the group now known as ISIS or ISIL as a branch of al Qaeda, which used the conflict to gain a foothold in Iraq.

“As I have said, President Obama’s decision to completely withdraw U.S. troops from Iraq in 2011 led to the rise of ISIL," McCain said in his statement. "I and others have long warned that the failure of the President’s policy to deny ISIL safe haven would allow the terrorist organization to inspire, plan, direct or conduct attacks on the United States and Europe as they have done in Paris, Brussels, San Bernardino and now Orlando.”

In 2010, McCain actually referred to it as a "victory" when Obama pulled troops out of Iraq, though he said President George W. Bush deserved credit for the moment, too.

Last American combat troops leave Iraq. I think President George W. Bush deserves some credit for victory. — John McCain (@SenJohnMcCain) August 19, 2010

The shooter in Orlando pledged allegiance to the group during the course of his attack at the Pulse nightclub where he killed 49 people over the weekend.

Democrats immediately slammed McCain's statement as out of bounds.

"Sen. McCain’s unhinged comments are just the latest proof that Senate Republicans are puppets of Donald Trump," said Adam Jentleson, a spokesman for Senate Minority Leader Harry Reid (D-Nev.).

This post has been updated to include a tweet McCain sent after his initial comments and a follow-up statement, as well as a tweet from 2010 about troops leaving Iraq.