Iraqi forces have withdrawn from the rebel-held northern Iraqi city of Tikrit after a new push to retake the city met heavy resistance, soldiers involved in the operation said.

Government troops and allied Shia volunteer fighters were forced to retreat just before sunset on Tuesday to a base 4km south after coming under heavy mortar shelling and sniper fire, the sources said.

The attempt to retake Tikrit, which fell to Sunni fighters led by the Islamic State group on June 12, began two-and-a-half weeks ago.

Live Box 201461213304888167

The failure highlights the difficulties of Baghdad's struggle to recapture territory from the fighters, who seized Mosul, Tikrit and other cities last month in a rapid offensive, the Reuters news agency reported.

Residents said there was no fighting on Wednesday morning in Tikrit, which lies 160km north of Baghdad.

It is a stronghold of ex-army officers and loyalists of executed former leader Saddam Hussein's Baath Party who allied themselves with the Islamic State-led offensive last month.

The Iraqi military had attacked from the village of Awja, about 8km south of the city, and the initial fighting on Tuesday occurred in the southern part of the city. The army retook Awja, the birthplace of Saddam, on July 3.

There was no word on casualties on either side after the assault on Tikrit, but social media accounts affiliated with the Islamic State group posted pictures appearing to show some the fighters who had died in the battle.

The social media accounts also claimed to have shot down an Iraqi army helicopter, but that claim could not be verified.

Source: Al Jazeera and agencies