WASHINGTON (AP) — Republican Sen. John McCain says President Barack Obama is "directly responsible" for the mass shooting in Orlando, Florida, because Obama has allowed the growth of the Islamic State group on his watch.

McCain — who lost to Obama in the 2008 presidential election — made the comment to reporters Thursday while Obama was in Orlando visiting with the families of those killed in Sunday's attack and some of the survivors.

In the aftermath of the shooting, presumptive Republican presidential nominee Donald Trump has accused Obama of putting U.S. enemies ahead of American's own people. Trump also has suggested that Obama himself might sympathize with radical elements.

Democrats criticized Trump and some Republicans tried to distance themselves.

McCain is seeking a sixth term in the Senate from Arizona.

A few hours later, McCain released the following statement:

“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. 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.”