Iraqi forces have fought fierce battles with armed rebels around the country's biggest oil refinery at Baiji, 200km north of the capital, shutting down the facility and stoking fears of a disruption in national energy supplies.
State TV reported that Iraqi forces backed by airplanes on Friday repelled four attacks on the Baiji refinery by rebels from the Islamic State of Iraq and the Levant (ISIL).
A local source in Baiji told Al Jazeera that the rebels withdrew after heavy clashes and that the refinery remained closed.
The town of Baiji is already in rebel hands.
At least 36 soldiers were killed in clashes elsewhere in the country during the day. They included 16 soldiers killed in Anbar province after their convoy came under attack.
The latest fighting came as Iraq's most respected Shia cleric called on Shias and Sunnis to rally behind the authorities to prevent the ISIL from destroying the country.
In a speech read by an aide, Grand Ayatollah Ali al-Sistani pleaded for stability and for Iraqis to stop their country from falling into the abyss.
He urged Sunnis and Shias to stand together against ISIL and called on the country's politicians to soon convene the newly-elected parliament so the process of forming the government could begin.
Many Iraqis fear the political class will postpone the government formation as long as possible to take advantage of the current chaos.
Sistani reemphasised a call made a week ago for civilians to volunteer and fight the ISIL.
He described his message as a call to arms for all Iraqis, not just his sect. His appeal was widely seen as giving a boost to a government and armed forces that had been deeply shaken in its war with Sunni armed groups, dominated by ISIL.
"If fighting and dislodging them is not done today, all will feel sorry tomorrow," Sistani said.
Sistani's appeal came amid reports that the ISIL has started to enact its vision of Islam in Mosul, which it captured 10 days ago as it swept across northern Iraq.
Mosul residents said ISIL members had destroyed symbols of Iraq's rich heritage, razing statues of cultural icons and the tomb of a Medieval philosopher.
The rapid ISIL advance has raised fears of Iraq being dismembered.
US President Barack Obama on Thursday offered up to 300 American special forces advisers to help the Iraqi government recapture territory that ISIL and other Sunni armed groups have seized.
But he held off granting a request for air strikes to protect the government and renewed a call for Iraq's long-serving Shia Prime Minister Nouri al-Maliki to do more to overcome sectarian divisions that have fuelled resentment among the large Sunni minority.