Government forces were in control of Iraq's biggest oil refinery on Thursday but insurgents were still inside the complex and sporadic clashes persisted, staff said.
Sunni Arab militants had stormed the complex in Baiji, south of Iraq's militant-held second city Mosul, on Wednesday, setting fire to several storage tanks for refined products in a move that sent jitters through world oil markets.
"Clashes stopped at about midnight (2100 GMT Wednesday), but keep breaking out again from time to time," Dhahi al-Juburi, an employee trapped inside the sprawling complex told AFP by telephone.
"Iraqi forces are still inside the refinery, and they control it," he said, adding that "insurgents are still in several places in the refinery, and even in some towers."
Another employee inside Baiji refinery, who spoke on condition of anonymity, echoed Juburi's account.
Prime Minister Nuri al-Maliki's security spokesman Lieutenant General Qassem Atta, however, told state television earlier on Thursday that the refinery was fully in government hands and that the militant assault had been repelled.
The offensive, spearheaded by jihadists but also involving supporters of ousted Sunni Arab dictator Saddam Hussein, began in Mosul, a city of some two million people, on June 9 and has advanced within 60 kilometres (40 miles) of Baghdad.
Security forces generally performed poorly when faced with the initial assault, in some cases shedding uniforms and abandoning vehicles to flee.
They seem to have recovered at least somewhat from the shock of the onslaught, gaining ground in some areas, but militants have made advances elsewhere.