Washington (AFP) - Islamic State fighters have regained territory in the contested city of Baiji, home to Iraq's largest oil refinery, the Pentagon said Wednesday.

Fierce fighting has been taking place for months in and around Baiji, and Iraqi forces and militia fighters had in recent weeks pushed back IS fighters in the northern town.

But much of that progress has been undone, Pentagon spokesman Captain Jeff Davis told reporters.

"We had seen some recent progress in recent weeks where the ISF (Iraqi Security Forces) had been able to regain some territory inside the city," he said.

"In the past several days, that's been largely reversed ... the trend has been downward there. A lot of the gains they had made were lost."

Davis said the United States remained committed to helping Iraqi forces.

"Clearly we are concerned about that, but we know that it's an ongoing, dynamic situation there, and we are committed to helping the ISF in being able to hold on to both the city and retake the refinery as well," he said.

The IS group swept across Iraq in June 2014 and overran the country's second city Mosul in less than 24 hours, before seizing much of the country's Sunni Arab heartland.