Sunni extremists on Wednesday battled security forces for control of Iraq’s largest oil refinery, which provides the nation with more than a quarter of its domestically refined petroleum products and could help fund the militants’ rampage across the country.

The loss of the refinery would mark another strategic blow to Prime Minister Nouri al-Maliki, who is urging the United States to bomb the militants as they push toward Baghdad from the country’s north.

In a televised address Wednesday, Maliki struck an upbeat tone on the security situation even as fighting raged at Baiji, saying volunteers who had answered a call from Iraq’s top Shiite cleric will form the core of the new security forces. The government hopes the recruits will help plug gaps in the army after mass desertions but is desperate for outside assistance.

Perhaps in an attempt to satisfy the United States, Maliki’s speech lacked some of the religious rhetoric of previous addresses. But he attacked his political opponents for assisting countries in the region in a “sinister” plot to break up the country.

The clashes at the Baiji refinery, 130 miles north of Baghdad, came after an agreement collapsed between workers and tribesmen affiliated with insurgents from the Islamic State of Iraq and Syria (ISIS), said state oil officials and refinery workers.

How the Islamic State is carving out a new country

The deal meant oil was still pumped to the facility last week even though militants who had taken over the surrounding area could hijack tankers, effectively controlling output, they said.

In Baghdad, military and security officials denied that the facility had fallen out of government hands. Gen. Qassim Atta, a military spokesman, said on Iraqiya television that the refinery was entirely under government control and that 40 insurgents had been killed as security forces repelled their advance Wednesday. Atta’s claims of government gains have conflicted with accounts from the ground in the past.

But even if the state manages to retain its grip on the refinery, the government will have to keep it offline as long as militants surrounding the facility can commandeer its output.

The shutdown also could prevent ISIS from supplying basic services in territory it now controls. Without the ability to provide fuel to power plants or distribute gasoline, the group could have a more difficult time building support from the civilian population.

As the northern city of Mosul fell to insurgents on June 10, tribesmen affiliated with ISIS negotiated with workers at Baiji to keep the oil pumping, said an employee at the refinery and two senior officials from the North Oil Company, who spoke on the condition of anonymity because of they were not authorized to discuss the matter publicly.

Seemingly unaware of the situation, Iraq’s Oil Ministry continued to supply crude oil from Kirkuk until Friday, when the supply was cut, they said.

State Department spokeswoman Jen Psaki confirmed that production at the plant had stopped for several days because of “a combination of technical and security reasons.”

ISIS insurgents fired mortars at the oil refinery in Baiji, forcing the temporary shutdown of Iraq's largest gasoline processing plant. Here's what you need to know about the strategic importance of this refinery. (Davin Coburn and Kate M. Tobey/The Washington Post)

The shutdown of the domestic oil facility will have little impact on crude exports, she said.

With the plant no longer running, ISIS launched an assault Wednesday morning. Air force helicopters attempted to repel the attack .

Clashes continued Wednesday night, workers said, indicating that at least some government forces were still inside.

“I don’t think their plan is to destroy the refinery,” said a Kirkuk-based senior official from the North Oil Company, who is in regular contact with colleagues from the North Refining Company, headquartered in the Baiji complex. “If they had such a plan, they could have done this earlier.”

Another Kirkuk-based official from the North Oil Company described the shutdown as “an important step taken to prevent the terrorists from using the fuel for their attacks, or to finance their operations.”

Although taking control of a shuttered refinery plant may be of little use to ISIS in the short term, supplies could be rigged from other oil fields in the future. The facility has the capacity to refine 320,000 barrels of oil a day, out of Iraq’s daily consumption of more than 700,000 barrels.

Foreign workers had been removed in the days leading up to the attack.

The Indian government confirmed Wednesday that 40 Indian construction workers were kidnapped in Mosul, and Turkey said it is investigating reports that 15 Turks were among 60 foreign construction workers abducted by insurgents near Kirkuk.

At a late-night meeting Tuesday, Maliki made a gesture toward bridging the sectarian divides in the country, as the United States has pressured him to do as it considers how to assist him.

The gathering was chaired by Ibrahim al-Jafari, a Shiite leader from Maliki’s party who preceded him as prime minister. Some of the country’s foremost Shiite members of parliament and three prominent Sunnis were in attendance: speaker of parliament Osama al-Nujaifi; his brother Atheel al-Nujaifi, who is governor of Mosul; and Deputy Prime Minister Saleh al-Mutlak.

A statement issued after the meeting pledged an end to sectarian hate speech, a ban on the carrying of weapons on the street by civilians and a “review” of unspecified political practices in the past.

Ameer al-Kenani, a member of parliament with the Shiite cleric Moqtada al-Sadr’s Al Ahrar party, said Iran also is pressuring Baghdad to rein in its sectarian tone. But he said Maliki’s thin gestures over the past 24 hours were little more than cosmetic.

“We’ve heard this talk for as almost a decade,” Kenani said. “Everybody knows it means nothing.”

Van Heuvelen reported from New York. Liz Sly in Baghdad contributed to this report.