Iraqi special forces are poised to enter Mosul in a bid to drive out Islamic State (IS) militants after fending off suicide car bombings as they swept into the last village on the city's eastern edge.

Armoured vehicles, including Abrams tanks, drew fire from mortars and small arms as they moved on the village of Bazwaya in an assault that began at dawn, while artillery and air strikes hit IS positions.

By evening, the fighting had stopped and units took up positions less than a mile from Mosul's eastern border and about five miles from the centre, two weeks into the offensive to retake Iraq's second-largest city.

Brig Gen Haider Fadhil of Iraq's special forces said: "We will enter the city of Mosul soon and liberate it from Daesh (an Arabic term for IS)."

He added that more than 20 militants had been killed while his forces suffered only one light injury from a fall.

Three suicide car bombers had tried to stop the advance before the army took control of Bazwaya, but the troops destroyed them, he said.

The army said another unit, its 9th Division, had moved toward Mosul and was about three miles from its eastern outskirts, the area of Gogjali.

At one point, a Humvee packed with explosives raced ahead and tried to ram the approaching forces, but Iraqi troops opened fire, blowing it up.

Plumes of smoke rose from IS positions hit by artillery and air strikes which the army said came from the US-led coalition.

State TV described the operation as a "battle of honour" to liberate the city, which was captured by IS from a superior yet neglected Iraqi force in 2014.

Some residents hung white flags on buildings and windows in a sign they would not resist government troops, said Maj Salam al-Obeidi, a member of the special forces operation in Bazwaya.

He said troops asked villagers to stay in their homes as Iraqi forces moved through the streets - a precaution against possible suicide bombers.

As night fell, broken glass in the streets glistened from the light of some burning houses, with several buildings suffering collapsed roofs from air strikes. The army estimates hundreds of families are in the village, but few ventured out.

Since October 17, Iraqi forces and their Kurdish allies, Sunni tribesmen and Shia militias have been converging on Mosul from all directions.

Entering Gogjali could be the start of a new slog for the troops, as they will be forced to engage in difficult, house-to-house fighting in more urban areas. The operation is expected to take weeks, if not months.

Iraqi forces have made uneven progress. Advances have been slower south of the city, with government troops still 20 miles away.

The US military estimates IS has 3,000-5,000 fighters in Mosul and another 1,500-2,500 in its outer defensive belt. The total includes about 1,000 foreign fighters.

Prime minister Haider al-Abadi appeared on state TV in combat fatigues and urged IS fighters in Mosul to surrender.

"We will close in on Daesh from all angles and, God willing, we will cut the snake's head," he said, while visiting troops in the town of Shura, south of Mosul.

"They will have no way out, and no way to escape," he said. "Either they die, or surrender."

On Sunday, thousands of fighters flocked to join Iraq's state-sanctioned, Iran-backed Shia militias who aim to cut off Mosul from the west.

In a series of apparent retaliatory attacks, bombs exploded in five of Baghdad's mostly Shia neighbourhoods, killing at least 17 people.

The deadliest - a parked car bomb - hit a popular fruit and vegetable market near a school in the north-western Hurriyah area, killing at least 10 people and wounding 34. IS claimed responsibility for the attack.

Separate attacks in and around Baghdad killed at least 16 people and wounded about 50, police said.

The deadliest was in the northern Shalla area when a car bomb ripped through a popular market area, killing at least eight civilians and wounding 23, police said.