withdrawal from the towns was intended to ensure "command and control" and to allow troops to regroup and retake the areas.
The towns are on a supply route between ISIL's positions in northwestern Iraq and eastern Syria, where the group has taken a string of towns and strategic positions over the past few days from rival Sunni forces fighting Assad.
The last major Syrian town not in ISIL's hands in the region, the border town of Albukamal, is controlled by the Nusra Front, al Qaeda's branch in Syria which has clashed with ISIL.
A monitoring group said on Sunday that ISIL fighters in northern Syria had for the first time been seen using US-made Humvee all-terrain vehicles seized from the Iraqi army.
Disowned by al Qaeda in February after defying the global leadership to pursue its own goals in Syria, ISIL has pushed south down the Tigris valley since capturing Mosul with barely a fight, occupying towns and taking large amounts of weaponry from the collapsing, U.S.-trained Iraqi army.
Sunni militants also seized Tal Afar, west of Mosul, an Iraqi government official said late on Sunday. Tal Afar has been contested for a week after the military initially lost the community of Sunni and Shi'ite Turkmens and then kicked off a counter-offensive. Iraqi officials have wanted to use Tal Afar as a launching pad for rallying Mosul's Sunni population to oust ISIL.
Overnight, ISIL fighters attacked the town of al-Alam, north of Tikrit, according to witnesses and police in the town. The attackers were repelled by security forces and tribal fighters, they said, adding that two ISIL fighters had been killed.
State television reported that "anti-terrorism forces" in coordination with the air force had killed 40 ISIL members and destroyed five vehicles in Tikrit, Saddam's hometown.
There was a lull in fighting at Iraq's largest refinery, Baiji, near Tikrit, on Sunday. The site had been a battlefield since Wednesday as Sunni fighters launched an assault on the plant. Militants entered the large compound but were repelled by Iraqi military units. The fighters now surround the compound.
A black column of smoke rose from the site on Sunday. Refinery officials said it was caused by a controlled burning of waste.
At least 17 soldiers and volunteers were killed in overnight clashes with ISIL militants in the Saied Ghareeb area near Dujail, 50 km (30 miles) north of Baghdad, army and medical sources said. Near the city of Ramadi, west of the