"I misspoke," McCain said in a statement.

ADVERTISEMENT "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."

The Arizona senator earlier Thursday said Obama was responsible for the shooting because he allowed for the growth of the Islamic State in Iraq and Syria (ISIS) during his presidency, ABC News reported

The comments came as Obama was in Orlando to meet with the families of victims of Sunday's shooting.

In the statement he issued to clarify his comments, McCain reiterated that the president's decision to completely withdraw U.S. troops from Iraq in 2011 "led to the rise of ISIL," using an alternate acronym for the group.

"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."

McCain, who lost the presidential race to Obama in 2008, is facing what may be the toughest reelection race of his Senate career against the likely Democratic nominee, Rep. Ann Kirkpatrick (D-Ariz.).

In a statement released Thursday afternoon, Kirkpatrick said, “Elected leaders have a moral duty to work together to root out terrorism and keep Americans safe. But today, we saw John McCain cross a dangerous line in comments that undermine our Commander in Chief on national security issues — at the very moment the president was in Orlando to comfort victims’ families. It’s difficult to imagine the old John McCain being this reckless with something so serious. John McCain has changed after 33 years in Washington.”

Trump campaign manager Corey Lewandowski on Thursday tweeted a Washington Post article on McCain's comments, with a link to the article. Trump has come under fire this week for suggesting that Obama sympathizes with terrorists.

After the shooting early Sunday morning, Trump, the presumptive GOP presidential nominee, said the president either didn't understand the radical Islamic terrorist threat or he "gets it better than anybody understands."