Iraqi pro-government forces on Saturday broke the siege of the country’s main oil refinery, where security forces had held out for months against the Islamic State jihadist group, officials said.

“Iraqi forces… reached the gate of the refinery,” the governor of Salaheddin province, Raad al-Juburi, told AFP.

Three officers confirmed that Iraqi forces had reached the refinery in the country’s north, which once handled some 300,000 barrels of oil per day, filling some 50 percent of national demand.

But it has been besieged for months and repeatedly attacked by jihadists, who were able to enter the massive refinery compound but failed to gain control of it.

The advance to the refinery came a day after another significant victory for Iraqi forces, who recaptured the strategic town of Baiji, just to the south.

Baiji is the largest town they have retaken since IS-led militants overran large parts of the country in June.

It lies on the road to second city and IS hub Mosul, and its capture further isolates militants who hold the city of Tikrit, to the south.

Iraqi security forces performed poorly in the initial days of the IS-led onslaught, when multiple divisions collapsed and the group seized large amounts of military equipment.

But helped by US-led air strikes, support from Shiite militias and Sunni tribesmen, and assistance from international advisers, Baghdad’s forces have begun to make progress.