The Iraqi military says it has driven off Islamist-led militants attacking the country's biggest oil refinery amid reports it had been overrun.
The army said 40 attackers had been killed, a claim which could not be verified independently.
But an official source told Reuters the rebels had seized 75% of the Baiji refinery north of Baghdad.
PM Nouri Maliki has urged Iraqis to unite against the militants in a televised speech.
Government forces are battling to push back ISIS (Islamic State in Iraq and the Levant) and its Sunni Muslim allies in Diyala and Salahuddin provinces, after the militants overran the second city, Mosul, last week.
US President Barack Obama is due to discuss the Iraq crisis with senior Congress members on Wednesday.
Senate leader Harry Reid, a Democrat, said he did not "support in any way" getting American troops involved in the Iraqi "civil war".
In other developments:
- UK Prime Minister David Cameron told Parliament in London that ISIS was also plotting terror attacks on Britain
- India confirmed that 40 of its citizens had been kidnapped in the violence-hit Iraqi city of Mosul
- Saudi Foreign Minister Saud bin Faisal warned that Iraq faced the risk of civil war
- Turkey is investigating reports that 15 Turkish builders were abducted by ISIS on Tuesday; 80 Turks were kidnapped in Mosul last week
Militants 'in control'
The attack reportedly started at 04:00 (01:00 GMT) from outside two of the three main entrances to the refinery, located 210km (130 miles) north of Baghdad.
Smoke rose from a spare-parts warehouse and some stores of oil were reportedly destroyed.
"The militants have managed to break into the refinery," the unnamed official told Reuters from inside the refinery. "Now they are in control of the production units, administration building and four watchtowers. This is 75% of the refinery."
Army spokesman Qasim Ata said in news conference broadcast live on TV: "The security forces thwarted an attempt by ISIS to attack the Baiji refinery and 40 terrorists were killed."
The nearby town of Baiji was overrun by ISIS-led militants last week. Foreign personnel, including a small number of British nationals, were evacuated from the refinery earlier but local staff reportedly remained in place.
Hundreds of people have been killed since the start of the militant offensive last week, many of them believed to be captured soldiers publicly shot by ISIS-led firing squads.
During fighting in the city of Baquba this week, 44 prisoners were killed inside a police station in unclear circumstances.
Analysis: Richard Galpin, BBC News, Baghdad
The refinery which is now shut down is critical for Iraq's supplies of petrol and other petroleum products. It supplies a quarter of the country's refining capacity. The power plant is equally important, as the country still suffers from acute shortages of electricity.
It was always likely the militants would target Baiji. The area is dominated by Sunni Muslims and was a hotbed of insurgent activity during the US occupation, making it fertile ground for ISIS.
And ISIS has a track-record of seizing lucrative assets such as refineries.
Government forces have renewed air strikes on militants while militants in the western province of Anbar say they have made advances, with a number of police stations near the town of Hit going over to dissident tribes.
Further north, the Iraqi government said it had recaptured the citadel in the strategic town of Tal Afar, where militants were said to have taken control on Monday.
An army spokesman told the AFP news agency that troops were planning to press on to militant-held areas in Mosul on Thursday.
"I would like to say once again that what has happened in Iraq is a setback but not every setback is a defeat," Mr Maliki said on Wednesday.
"This setback has allowed Iraq to recover its national unity and Iraqis have managed to recover their feeling that they are in danger and that not a single Iraqi will benefit from this crisis."
Mr Maliki has long been accused of favouring the country's Shia Muslim majority and fomenting unrest among the Sunni minority.
Iranian President Hassan Rouhani has said Tehran will not "spare any effort" to defend Shia holy shrines in Iraq against "mercenaries, murderers and terrorists".
He was speaking amid reports that the head of the elite Quds Force of the Iranian Revolutionary Guards, Qasem Soleimani, was in Baghdad to help co-ordinate the fight against the militants.
ISIS in Iraq
ISIS grew out of an al-Qaeda-linked organisation in Iraq
- Estimated 10,000 fighters in Iraq and Syria
- Joined in its offensives by other Sunni militant groups, including Saddam-era officers and soldiers, and disaffected Sunni tribal fighters
- Exploits standoff between Iraqi government and the minority Sunni Arab community, which complains that Shia Prime Minister Nouri Maliki is monopolising power
- ISIS led by Abu Bakr al-Baghdadi, an obscure figure regarded as a battlefield commander and tactician