Story highlights

McCain argued that Obama's failure to adequately address terror threats led to the rise of ISIS

Senate Minority Leader Harry Reid's spokesman immediately blasted McCain's remarks

Washington CNN  — 

Sen. John McCain said Thursday that President Barack Obama was “directly responsible” for the massacre at the gay nightclub in Orlando, though McCain later said he “misspoke.”

“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 – utter failures, by pulling everybody out of Iraq, thinking that conflicts end just because you leave. So the responsibility for it lies with President Barack Obama and his failed policies,” McCain told reporters on Capitol Hill.

The Arizona Republican, who has been sharply critical of the President’s foreign policy strategy, argued that his failure to adequately address terror threats led to the rise of ISIS.

Sources: Grand jury to investigate Orlando shooter’s widow

McCain said later he “misspoke,” using a statement to clarify that it was not the President himself who was “personally responsible,” but his “security decisions.”

“I misspoke. I did not mean to imply that the President was personally responsible. I was referring to President Obama’s national security decisions, not the President himself. 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, using another name for ISIS.

McCain also tweeted, “To clarify, I was referring to Pres Obama’s national security decisions that have led to rise of #ISIL, not to the President himself.”

Pol: Terror won’t stop my AR-15 giveaway

Asked about the comments on Friday, White House spokeswoman Jennifer Friedman tied McCain’s remarks to recent attacks by presumptive Republican presidential nominee Donald Trump.

RELATED: Trump’s Obama conspiracy theory: He has ‘something else’ in mind

“You’ll recall a certain Republican presidential candidate made a similar comment. And at that time, when you all asked (White House Press Secretary Josh Earnest) for his reaction, he said we’re not going to be distracted by small things. So that applies to this situation as well,” Friedman said.

She added, “What the President is focused on is exactly what he was talking about yesterday when he was in Orlando visiting with the families of victims and some of the survivors of the horrible attack last weekend. And at that moment, he was explaining to everyone that we’re all going to have to work together at all levels of government, across political lines, to do more to stop these killers who want to terrorize us.”

Senate Minority Leader Harry Reid’s spokesman also tied McCain to Trump in quickly condemning the Arizona senator’s remarks, saying, “Senator McCain’s unhinged comments are just the latest proof that Senate Republicans are puppets of Donald Trump.”

Former Arizona Gov. Jan Brewer told CNN’s Erin Burnett on “OutFront” Thursday night that she was “a little bit amused” by the discussion about McCain’s statement considering he had clarified his comments.

“As a politician, sometimes on the spur of the moment we say things,” Brewer told Burnett. “He did walk back that it wasn’t President Obama personally.”

Omar Mateen, the gunman who killed 49 people at Orlando’s Pulse gay nightclub over the weekend, pledged allegiance to ISIS during his attack.

Obama is in Orlando on Thursday, meeting with family and friends of those killed and wounded in Sunday’s attack.

CNN’s Kevin Liptak contributed to this report.