Obama in Orlando
Barack Obama and Vice President Joe Biden place flowers at a makeshift memorial for shooting victims of the massacre at a gay nightclub in Orlando, Florida, on 16 June Reuters

US senator John McCain has said that Barack Obama was "directly responsible" for the Orlando nightclub shooting for failing to combat the rise of Isis.

The comments, which echo ones made by presumptive Republican nominee Donald Trump, came as the president was in Orlando to meet survivors of the terrorist attack as well as the families of the 49 killed on 12 June.

According to The Washington Post, the 2008 Republican nominee made his comments to a small group of reporters in a Senate hallway after being asked about the gun-control debate that has overtaken Capitol Hill. McCain placed the blame squarely on Obama due to his foreign policy.

"Barack Obama is directly responsible for it, because when he pulled everyone out of Iraq, al-Qaeda went to Syria, became Isis, and Isis is what it is today thanks to Barack Obama's failures," the Arizona senator said. When pressed about his comments, McCain maintained Obama should not have withdrawn combat troops from Iraq, the Post reported.

"He pulled everybody out of Iraq, and I predicted at the time that Isis would go unchecked, and there would be attacks on the United States of American," he said. "It's a matter of record so he is directly responsible."

After the comment's were published, McCain's office released a statement saying the senator "misspoke".

"I did not mean to imply that the President was personally responsible," he 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 US 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 organisation 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."

John McCain
Arizona senator John McCain Getty Images

Obama and vice president Joe Biden went to Orlando to meet survivors and bereaved families on 16 June. The White House said the visit aimed to show "the country stands with the LGBT community in Orlando as they grieve."

According to the BBC, when he touched down in Orlando, Obama embraced Mayor Buddy Dyer before being driven to downtown to meet with the bereaved at the Amway Centre.

The president said the terrorist attack proved there is a need to establish tighter gun control. Senate Democrats, led by Connecticut Senator Chris Murphy, took the floor of the Senate for a nearly 15-hour filibuster to force Republicans to vote on two gun control measures.

Murphy finally yielded the floor in the early hours of 16 June after reporting Republican leaders had agreed to call to vote on measures that would ban people on the government's terrorist watch list from obtaining gun licenses and expand background checks to gun shows and internet sales.

The Orlando gunman, 29-year-old Omar Mateen, made calls during the massacre to pledge his allegiance to Isis and also spoke about an affiliate of al-Qaeda and Hezbollah, which are Isis enemies.

Mateen killed 49 people and injured 53 others during the attack.