Iraqi men carry their weapons as they volunteer to fight along side the Iraqi security forces against Jihadist militants who have taken over several northern Iraqi cities, on June 15 2014, in the capital Baghdad. Faced with a militant offensive sweeping south toward Baghdad, Prime Minister Nuri al-Maliki announced the Iraqi government would arm and equip civilians who volunteer to fight, and thousands have signed up. AFP PHOTO/AHMAD AL-RUBAYE (Photo credit should read AHMAD AL-RUBAYE/AFP/Getty Images)

By Lesley Wroughton

WASHINGTON, June 15 (Reuters) - The Obama administration is mulling possible discussions with Iran over the mounting security crisis in Iraq, a senior official said on Sunday, in what would mark a major step in U.S. engagement with its longtime adversary.

Speaking on condition of anonymity, the official said the United States was considering talking to Iran about Iraq, where the government of Shi'ite Prime Minister Nuri al-Maliki is seeking to repel a stunning advance by Sunni militants who have seized several cities.

Fighters from the Islamic State of Iraq and the Levant (ISIL) group have swept through towns in the Tigris valley north of Baghdad in recent days but appeared to have halted their advance outside the capital on Sunday as they tightened their grip on the north.

ISIL's advance may pose the worst security crisis to Iraq since the worst of the sectarian bloodshed that followed the U.S.-led invasion to oust Saddam Hussein in 2003.

President Barack Obama said on Friday he needed several days to determine how the United States would help Iraq fend off ISIL, but he ruled out sending U.S. troops back into combat in Iraq. U.S. troops left Iraq in 2011 after a bloody, costly war that lasted more than eight years.

If the United States does decide to hold talks over Iraq with Iran, which it has routinely blamed for fueling violence in Iraq since 2003, it's not clear where or how those talks would take place.

The Wall Street Journal, which on Sunday reported the Obama administration was preparing for such talks, said one possible channel was through Vienna, where senior U.S. and Iranian officials were scheduled to meet with other world powers on Monday to negotiate limits on Iran's nuclear capabilities.

The State Department said on Sunday that the No. 2 U.S. diplomat, Deputy Secretary of State Bill Burns, would travel to Vienna this week to take part in the talks.

The White House cautioned that no discussions had yet taken place.

"There has been no contact with Iran on this issue thus far, nor do we have any plans to preview," a White House official said.

But both Washington and Tehran are alarmed by the rapid advance of ISIL, which is seeking to establish an Islamic state across much of Iraq and neighboring Syria.

U.S. Senator Lindsey Graham said on Sunday that Washington needed Iran's involvement to prevent a government collapse in Iraq and should open talks with Tehran.

"We are probably going to need their help to hold Baghdad," Graham, a South Carolina Republican, said on CBS' "Face the Nation." (Additional reporting by Jim Loney and Jeff Mason; Editing by Missy Ryan, Peter Cooney and Sandra Maler)