The Islamic State of Iraq and Syria, once a part of al Qaeda, has captured large swaths of Iraq including Mosul, a major city in the north. Kurdish forces have taken the oil-rich city of Kirkuk after reports government forces have fled. Insurgents are also rapidly advancing on Baghdad, the seat of the Shiite-dominated government.

McCain blames Obama and his national security team for the rout, saying it was responsible for withdrawing U.S. combat troops from Iraq and calling back the generals McCain said has been the successful architects of security in the war-ravaged country.

McCain specifically called for the resignation of Gen. Martin Dempsey, the chairman of the Joint Chiefs of Staff.

“The first thing is get rid of this national security team, which has been a total failure,” he told reporters ahead of a classified Senate Armed Services Committee briefing on the security situation in Iraq. “[They] called back in people who succeeded in Iraq like General Petraeus, General Mattis, many of the other leaders —General Keane, who’s the architect of the surge."

General David Petraeus presided over the 2007 surge in U.S. forces in Iraq. Obama shifted him to Afghanistan in June of 2010 to replace General Stanley McChrystal, who resigned after he was quoted in Rolling Stone magazine mocking Obama’s national security team.

General James Mattis replaced Petraeus as commander of the U.S. Central Command, which has responsibility for the Middle East, including Iraq and Afghanistan. He stepped down from that role in early 2013.

General John “Jack” Keane wrote a paper with American Enterprise Institute scholar Fred Kagan that spurred former President George W. Bush to send more than 20,000 additional troops to Iraq. He retired from the Army in 2003.

McCain left the closed-door briefing after only a matter of minutes, telling reporters the security situation in Iraq “is the greatest threat since the Cold War.”

McCain said later on the Senate floor that the withdrawal of U.S. troops from Iraq was dictated by politics and not by the nation’s security interests.

“All of this could have been avoided,” McCain said of the growing strength of al Qaeda-linked jihadists in Iraq.

He warned they will use the territory they control in Iraq and Afghanistan to plot and launch attacks against the United States.

He accused the Obama administration of squandering the security gains that cost the lives of 4,486 American soldiers and cost U.S. taxpayers what a 2013 Harvard study estimated to be $4 trillion to $6 trillion.

McCain blasted White House Chief of Staff Denis McDonough, Obama’s former deputy national security advisor, for telling reporters in 2011 that Iraq was secure, stable and self-reliant.

“There’s no question this is a success,” McDonough said at the time while serving as deputy national security advisor.

Instead, McCain said the unraveling of Iraqi security is a “colossal failure of American security policy.”

McCain said air strikes should be considered to slow the insurgents’ advance.

“Explore all the options of air power. Get a team over there to advise them,” he said.

Sen. James Inhofe (R-Okla.), the ranking member on the Senate Armed Services Committee, said "it's too early" to consider air strikes, however.

McCain said Obama’s announcement on Oct. 21, 2011, that he would withdraw all U.S. combat troops marked the turning point in Iraq.

McCain recalled his remarks that day: “I said, ‘Today marks a harmful and sad setback for the United States in the world.’”

Sen. Kelly Ayotte (R-N.H) said the deteriorating security situation was due to the Obama administration failing to secure a status of forces agreement with the Iraq government that would have allowed U.S. troops to stay in the country.

"We're seeing the unraveling of Iraq," she told reporters before the committee meeting, expressing concern for the security of the U.S. embassy there.

She said the ongoing crisis was a "lesson for Afghanistan" and chided the president's recent West Point speech in which he announced all troops would be out of that country by the end of 2016.

"I hope the president would take some of the lessons of what we're seeing happening in Iraq and not repeat them in Afghanistan," Ayotte said.