Iraqi troops backed by Shi'ite militia have seized back part of the oil refinery town of Baiji from Islamic State, a general said.

The commander of the Interior Ministry's Quick Reaction Forces, Brigadier General Nassir al-Fartousi, told Iraqi state TV that Iraq's flag had been hoisted again over the town's hall, and troops were advancing to other areas.

Brigadier General Saad Maan Ibrahim, the spokesman for Joint Operations Command, said an "important victory" had been won.

"The enemy has suffered a defeat and has sustained heavy losses and we hope that the whole city will be cleared within few days," Maan told The Associated Press.

He claimed that "dozens" of IS militants had been killed, and that recapturing the town would enable forces to recapture the refinery on its outskirts.

Ibrahim, a spokesman for the Iraqi defence ministry, told CNN that US forces had played a key role supporting the Iraqi operation, but did not specify how.

Last week, the Telegraph reported that Shi'ite fighters from the Imam Ali Brigade were fighting Isis in Baiji alongside US trained Iraqi special forces, supported by US air strikes.

The refinery, which is Iraq's second largest, has been fiercely contested by Iraqi government forces and Isis since the jihadist group seized control of swaths of northern Iraq a year ago.

In recent months Iraqi government forces backed by Shia militias have launched a series of operations against Isis, ousting the group from the city of Tikrit in March. However Isis scored a significant victory when they took control of Ramadi, capital on Anbar province, west of Baghdad.