Arizona Senator John McCain on Thursday said that President Barack Obama's policies were “directly responsible” for a mass shooting over the weekend in Orlando.

Forty-nine people died and dozens were injured when a lone gunman opened fire early Sunday morning inside a gay nightclub.

Omar Mateen, 29, pledged allegiance to ISIS during a 911 call from inside the club. He also pledged allegiance to other groups, some of which are enemies of ISIS.

According to the AP, McCain told reporters that Obama was “directly responsible” for the attack.

McCain clarified in a statement that he was referring to the president's policies.

“I did not mean to imply that the president was personally responsible,” the 2008 Republican presidential nominee said. “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.”

Obama has called Mateen a “homegrown terrorist” with no actual connection to ISIS.

McCain made his remarks as Obama and Vice President Joe Biden were meeting with the families of victims in Orlando.