Sunni militants have hung their black banners on watch towers at Iraq's largest oil refinery, a witness said, suggesting the vital facility had fallen to the insurgents.
But a top Iraqi security official said the government still held the facility and government forces protecting it were still inside and in regular contact with Baghdad.
The fighting at Beiji, some 250 kilometers north of Baghdad, comes as Iraq has asked the US for airstrikes targeting the militants from the Islamic State of Iraq and the Levant.
While US President Barack Obama has not fully ruled them out, such action is not imminent in part because intelligence agencies have been unable to identify clear targets on the ground, officials said.
The Iraqi witness, who drove past the sprawling Beiji refinery, said militants also manned checkpoints around it. He said he saw a huge fire in one of its tankers.
Helicopter gunships flew over the facility to stop further militant advances, the Iraqi security official said. The insurgents took over a building just outside the refinery and were using it to fire at the government force, he said.
The army officer in charge of protecting the refinery, Colonel Ali al-Qureishi, told state-run Iraqiya television it remained under his control. He said his forces had killed nearly 100 militants since Tuesday.
Oil Minister Hussain al-Shahristani praised "the heroic sons of the armed forces" at the refinery in a statement.
They "are putting up a spirited fight to prevent the terrorists from reaching its walls despite the ferocity of the repeated attacks", he said.
The Beiji refinery accounts for just over a quarter of the country's refining capacity, all of which goes towards domestic consumption in the form of petrol, cooking oil and fuel for power stations.
Fuel produced at the refinery largely goes to northern Iraq and its closure has caused a shortage in the region.
The assault has affected global fuel prices, as the US national average price reached the highest for this time of year since 2008, the year it hit its all-time high in America.
The price of benchmark crude for July delivery rose 57 cents today to 106.54 US dollars per barrel in electronic trading on the New York Mercantile Exchange.
Amid the offensive, Iraq has formally asked the US to launch airstrikes against positions of the Islamic State, Iraqi Foreign Minister Hoshyar Zebari said.
General Martin Dempsey, chairman of the US Joint Chiefs of Staff, confirmed the US had received a request for air power to stop the militants, but highlighted the uncertain political situation in Iraq.
"The entire enterprise is at risk as long as this political situation is in flux," he told a Senate panel. He added that some Iraqi security forces had backed down when confronted by the militants because they had "simply lost faith" in the central government in Baghdad.
The campaign by the al-Qaida-inspired Islamic State militants has raised the spectre of the sectarian warfare that nearly tore the country apart in 2006 and 2007.
The popular mobilisation to fight the insurgents is 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 US 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.