Islamic State militants clashed with security forces inside Iraq's largest refinery on Thursday and held on to recent gains in the west of the country, as Prime Minister Haider al-Abadi said the extremist group remained "very, very dangerous".
The insurgents suffered a major defeat this month when Iraqi troops and Shi'ite paramilitaries routed them from the city of Tikrit, but are now striking back at Baiji refinery and in the western province of Anbar.
Baiji was attacked several days ago by the militants, who blasted their way through the perimeter and took control of several installations, including a distribution point and storage tanks. They have managed to hold those parts of Baiji.
A source in the military operations command for Salahuddin province where Baiji is located said an Iraqi army battalion had arrived to help defend the refinery on Thursday, and the militants had not been able to take any major infrastructure.
Islamic State sympathisers circulated photographs on social media late on Thursday appearing to show the militants inside the refinery with the caption: "the soldiers of the (Islamic) State advance to cleanse what is left of Baiji refinery".
The images could not be independently verified.
Speaking at the Center for International and Strategic Studies think tank in Washington, Prime Minister Haider al-Abadi said the militants wanted to send a message after losing Tikrit.
"I think it's timed to (coincide with) my visit to the U.S. - I think they want to show that despite the support that Iraq is receiving, they are there to cause damage."
During his visit, Abadi outlined plans to prioritise the battles in both Baiji and Anbar, where Islamic State overran an area at the eastern edge of the provincial capital Ramadi on Wednesday.
The government last week announced a new offensive to recapture Anbar, seeking to build on the recent victory in Tikrit, but have since lost ground in the vast desert terrain.
Anbar governor Sohaib al-Rawi speaking on Iraq state TV said "all sons of Iraq" were welcome to participate in liberating the province from Islamic State, indicating no objection to the involvement of Shi'ite paramilitaries.
Shi'ite militia have played a leading role in driving back the insurgents after the army disintegrated last summer, but some tribes in Anbar, a Sunni province, have expressed reservations about the involvement of paramilitaries there.
A police source in Anbar said Shi'ite militias had arrived in Ramadi to take part in trying to push back Islamic State.