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 Shiite paramilitaries routed them from the city of Tikrit, but are now striking back at the 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.