Sen. John McCain speaks on Capitol Hill in April. (Evan Vucci / Associated Press)

Republican Sen. John McCain (R-Ariz.) said Thursday that President Obama is "directly responsible" for the mass shooting in Orlando, Fla,, because Obama has allowed the growth of Islamic State group on his watch.

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

"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," a visibly angry McCain told reporters in the Capitol as the Senate debated a spending bill.