TAL AFAR - Iraqi forces on Tuesday recaptured from the Islamic State group the first two districts of jihadist bastion Tal Afar, as the Pentagon chief visited Baghdad in a show of support.
The United Nations said thousands of civilians have fled Tal Afar in the two days since the start of the broad offensive backed by the US-led coalition fighting IS.
In remarks before meeting in Baghdad with Prime Minister Haider al-Abadi, US Defence Secretary Jim Mattis said he wanted to keep the spotlight on eradicating the jihadists.
"Right now our focus is on defeating ISIS inside Iraq, restoring Iraqi sovereignty and territorial integrity," said the Pentagon chief, using an alternative acronym for IS.
Iraqi troops, supported by the forces of a US-led international coalition, routed IS in Mosul in July after a gruelling nine-month fight for Iraq's second city.
They launched the offensive on Sunday to recapture Tal Afar, once a key IS supply hub between Mosul -- around 70 kilometres (45 miles) to the east -- and the Syrian border.
The jihadists inside Tal Afar, estimated to number around 1,000, responded with artillery fire Tuesday as the Iraqi forces massed outside the city.
Army, police and units of the Hashed al-Shaabi paramilitary coalition later took "full control" of Al-Kifah and Al-Nur districts in Tal Afar, the Hashed said.
The Iraqi forces had encircled the city despite what Hashed spokesman Ahmed al-Assadi described as "intense" fighting. He said the fighting for the city would likely last weeks.
The International Organization for Migration said its teams were "responding to thousands of civilians fleeing Tal Afar since the launch of the military campaign".
Since Friday, more than 3,000 people had arrived at two IOM emergency sites, many with just the clothes on their back, said the UN agency.
The UN refugee agency (UNHCR) said it had received some 9,000 people at the Hamman Al Alil transit centre in the past week, and it was preparing to accommodate nearly 30,000 more.
- 'Fought like the dickens' -
Mattis declined to make any predictions on the battle.
"ISIS's days are certainly numbered, but it's not over yet and it's not going to be over anytime soon," he said.
Iraqi forces had "fought like the dickens in Mosul, (it) cost them over 6,000 wounded, somewhere over 1,200 killed," he noted.
Yet that comeback restored the confidence of the Iraqi forces after their shock loss of Mosul to IS in 2014.
Mattis stressed that retaking Mosul would not have happened "without... Abadi's steady hand" but also thanks to extensive US support.
The future of that support still must be settled, and there would be resistance from Shiite militia and Iranians, said Nicholas Heras, Middle East Security Fellow at the Center for a New American Security in Washington.
Mattis will also meet in Arbil with Massud Barzani, president of the Iraqi Kurdistan region.
Mattis had said his discussions in Iraq would focus on the way ahead, including how to keep the country from again politically fragmenting or falling further under Iran's influence.
"Secretary Mattis is going to be very much focused on a pathway for the United States to continue to have to a residual force in Iraq to continue to train Iraqi security forces" and avoiding a successor from IS rising up, said Heras.
- Kurdistan referendum challenge -
A key issue is Iraqi Kurdistan's plan for an independence referendum on September 25, strongly opposed by the US as an event that could undermine Abadi and distract from the fight against IS.
"A referendum at this time would be potentially catastrophic to the counter-ISIS campaign," said Brett McGurk, the White House envoy to the anti-IS coalition.
"It's not just the United States; every member of our coalition believes that now is not the time to hold this referendum."
McGurk said the initial push on the outskirts of Tal Afar was "going well", with 235 square kilometres (90 square miles) cleared in the first 24 hours.
Iraqi and US forces were "moving faster, more effectively, more efficiently," he said, in part due to US President Donald Trump having given Mattis more authority to decide on tactics and resources needed.
Mattis, who is on a five-day swing through Jordan, Iraq, Turkey and Ukraine, said he would also talk about reconstruction and resettlement of hundreds of thousand of Iraqis driven from their homes and towns by the fighting, especially Mosul.
"It's not going to happen overnight. It's going to be a heavy lift for them going forward."
But Heras said Mattis, whom he said has earned firm trust among Iraqis, needs to help Abadi further build his power as a moderate for the post-war, with elections looming for next year.
"That will be a political pickle that Mattis will have to work Abadi through," he said.