WASHINGTON — The United States needs Iran’s involvement to prevent a collapse of the government in Iraq and should open talks toward that end, Sen. Lindsey Graham said Sunday, a step he described as unattractive but perhaps unavoidable.

“We are probably going to need their help to hold Baghdad,” from takeover by the Islamic State in Iraq and the Levant, the Sunni Muslim militant group that has seized control over northern Iraqi cities and is approaching the nation’s capital, said Graham, R-South Carolina, on CBS’ “Face the Nation.”

“The Iranians have an interest. They have Shia populations to protect. We need a dialogue of some kind,” to help stabilize Iraq but also set limits to be sure Iran does not use the situation to seize territory, he said.

The advance of ISIL fighters on Baghdad slowed on Sunday as the government of Prime Minister Nuri al-Maliki tried to rally its forces and stave off a civil war.

Still, a suicide bombing in Baghdad and fierce fighting in the northern town of Tal Afar highlighted the country’s slip into sectarian violence between a Sunni minority and the Shiite-dominated government.

Graham’s comments were part of a flurry of Republican criticism on Sunday of the Obama administration’s response to the fast-developing crisis.

Obama has ruled out the use of U.S. ground troops, and said any air support or other assistance was conditional on Maliki trying to overcome divisions between Sunnis and Shiites that have widened under his rule.

“It is too late to have long political reconciliation meetings that will last weeks or months,” House Intelligence Committee Chairman Mike Rogers, a Michigan Republican, said on “Fox News Sunday.” “You have an al-Qaida army on the move.”

The United States ordered an aircraft carrier moved into the gulf on Saturday, readying it in case Washington decides to pursue a military option after insurgents overran towns and territories in the north and advanced on Baghdad.

Rogers said the administration should organize neighboring Arab states in a joint response, and support that with U.S. intelligence, air power, and other assistance. He said the threat was not just regional, but of ISIL establishing a safe haven for itself, and using that to plan attacks against targets in the United States or Europe.

The last U.S. troops left Iraq in 2011 after the failure of talks between Maliki and Obama over a longer-term U.S. military presence.

Graham, a member of the Senate Armed Services Committee, last week said American air strikes in Iraq will be needed to halt the advance of militants.

His comments about Iran broach an even more sensitive topic — putting the United States in potential collaboration with a country it suspects of developing nuclear weapons and supporting its own militant groups in places like Lebanon.

Iranian officials, closely allied with Maliki and watchful over the Shiite population centered in southern Iraq, have also been alarmed at the sudden seizure of territory by the ISIL.