In the strongest sign yet of U.S. doubts about Iraq's stability, the Obama administration is weighing whether to press the Shiite prime minister to step down in a last-ditch effort to prevent disgruntled Sunnis from igniting a civil war.
An Iraqi Shiite lawmaker, Shiite Hakim al-Zamili, said he was aware of a meeting in recent days between Iraqi political leaders and U.S. officials over the issue of al-Maliki's future. He said he did not know who attended the meeting.
Al-Zamili belongs to a political bloc loyal to anti-U.S. cleric Muqtada al-Sadr, who has publicly demanded that al-Maliki, in office since 2008, be replaced.
"My view is that safeguarding Iraq is now our top priority," al-Zamili said, referring to the loss of a vast chunk of northern Iraq to the militants over the past week. "We will settle the accounts later."
Mohammed al-Khaldi, a top aide to outgoing Sunni speaker of parliament, Osama al-Nujaifi, said: "We have asked the Americans, Britain, Turkey, Saudi Arabia and Iran to work toward denying al-Maliki a new term. The Shiite bloc must find a replacement for him."
Besides the Sunnis, many of al-Maliki's former Kurdish and Shiite allies have been clamoring to deny the prime minister a third term in office, charging that he has excluded them from a narrow decision-making circle of close confidants.
"We wanted him to go but after what happened last week we want it even more," said Mahmoud Othman, a veteran Kurdish politician.
Al-Maliki said this week that the newly elected parliament will meet within days to elect a new president who will in turn ask the leader of the chamber's largest bloc to form a new government. His State of the Law bloc won 92 of the chamber's 328 seats in the April 30 election. He needs a majority of at least 165 lawmakers.
It took al-Maliki several months after the 2010 parliamentary elections to cobble together a government.
The prime minister, who has long faced criticism for not making his government more inclusive, has been adopting conciliatory language in recent days toward Sunnis and Kurds. He said the militant threat affects all Iraqis regardless of their ethnic or religious affiliation and called on Iraqis to drop all "Sunnis and Shiites" talk.
Al-Maliki also made a show of meeting Tuesday with Shiite, Sunni and Kurdish political leaders. A statement issued after the meeting said they agreed to set aside differences and focus on "national priorities."
Despite the warm words, al-Maliki is not known to have made any concrete offers to bridge differences with the Sunnis or the Kurds, who have been at loggerheads with the prime minister over their right to independently export oil from their self-rule region in the north and over territorial claims.
The Beiji oil refinery, where Iraqi forces were battling ISIL militants, lies some 250 kilometers (155 mile) north of Baghdad.
A witness who drove past the facility said the militants manned checkpoints around it and hung their black banners on watchtowers. He spoke on condition of anonymity because he feared reprisals.
One of the militants laying siege to the refinery confirmed by telephone that the facility remained in government hands, saying helicopter gunships slowed the insurgents' advance. The militant identified himself only by his alias, Abu Anas, and there was no way to verify his identity or location.
The army officer in charge of protecting the refinery, Col. Ali al-Qureishi, told state-run Iraqiya television by telephone that the facility remained under his control. He said his forces had killed nearly 100 militants since Tuesday.
A top Iraqi security official, speaking on condition of anonymity, said the refinery's workers were evacuated to nearby villages.
Photos obtained by The Associated Press showed the charred skeletons of destroyed army vehicles by a road that runs past the facility. The photos, taken Thursday morning, also show U.S.-made Humvees captured by the militants flying the black banners and the heavily armed militants manning a checkpoint. In the background, heavy black smoke rises up from the refinery.
The facility's production accounts for just over a quarter of the country's entire refining capacity. It goes strictly toward domestic consumption for gasoline as well as fuel for cooking and power stations.
The gasoline largely goes to northern Iraq, and its closure this week has already caused a shortage there. In Irbil, a city controlled by ethnic Kurds, lines stretched for miles at gas stations as angry motorists shouted at each other.
"Everybody in Mosul and the (northern) Nineva province is coming to Kurdistan to fill up on gas," said a resident of a village near Mosul who gave his name as Mohammed. "And they don't have enough here."
Electricity also went out in some areas held by the Islamic State.
The assault on the refinery also has affected global gasoline prices, as the U.S. national average price reached $3.68 per gallon, the highest price for this time of year since 2008, the year gasoline hit its all-time high in America.
It isn't clear what the insurgents would do if they fully captured Beiji. In Syria, the Islamic State has control of some smaller oil fields, but government air raids have limited their ability to profit from them. Militants have, however, refined oil into usable fuel products at primitive refineries.
The campaign by the Islamic State militants has raised the specter of the sectarian warfare that nearly tore the country apart in 2006 and 2007, with the popular mobilization to fight the insurgents taking an increasingly sectarian slant, particularly after Iraq's top Shiite cleric made a call to arms on Friday.
The Islamic State has vowed to march to Baghdad and the Shiite holy cities of Karbala and Najaf, home to some of the sect's most revered shrines, in the worst threat to Iraq's stability since U.S. troops left in late 2011. The militants also have tried to capture Samarra, a city north of Baghdad and home to another major Shiite shrine.
On Thursday, the bullet-riddled bodies of four handcuffed men, presumably Sunnis, were discovered in the Shiite Baghdad district of Abu Dashir, police and morgue officials said. A roadside bomb hit a police patrol on a highway in the east of the city, killing two police officers and wounding two, police and hospital officials said.
All officials spoke on condition of anonymity because they were not authorized to speak to the journalists.
Associated Press writers Diaa Hadid in Irbil, Iraq; Adam Schreck in Dubai, United Arab Emirates; Zeina Karam in Beirut; Lara Jakes and Julie Pace in Washington; and Jonathan Fahey in New York contributed to this report.