BAZWAYA, Iraq — Iraqi special forces stood poised to enter Mosul in an offensive to drive out Islamic State militants after sweeping into the last village on the city’s eastern edge Monday while fending off suicide car bombs without losing a soldier.

Armored 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 airstrikes hit Islamic State positions.

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

“We will enter the city of Mosul soon and liberate it from Daesh,” said Brig. Gen. Haider Fadhil of Iraq’s special forces, using an Arabic acronym for the extremists. He said that more than 20 militants had been killed while his forces suffered only one light injury from a fall.

Three suicide car bombers 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 3 miles from its eastern outskirts, the neighborhood 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 Islamic State positions hit by artillery and airstrikes that the army said came from the U.S.-led coalition.

State TV described the operation as a “battle of honor” to liberate the city, which was captured by the Islamic State 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.

.Since Oct. 17, Iraqi forces and their Kurdish allies, Sunni tribesmen and Shiite militias have been converging on Mosul from all directions. Entering Gogjali could be the start of a new slog for the troops, as they’ll 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 U.S. 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 Islamic State 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.”