BAGHDAD — U.S. Defense Secretary Ash Carter has arrived in Baghdad to meet with American commanders and Iraqi leaders and to assess progress in the fight to retake the northern city of Mosul from the ISIS group.

The unannounced visit on Sunday came as Iraqi security forces have been slowed in their nearly two-month-old offensive against ISIS, which has occupied Mosul for more than two years.

Carter flew into Baghdad aboard a military cargo plane. He was scheduled to meet with Prime Minister Haider al-Abadi as well as top U.S. and coalition commanders.

In Bahrain on Saturday, Carter announced he is sending another 200 troops to Syria to train and advise local fighters combatting ISIS. There were already 300 U.S. troops authorized for the Syria effort, and some 5,000 in Iraq.

The recapture of Mosul, the country's second largest city, is crucial to the Iraqis' hopes of restoring their sovereignty, although political stability will likely remain a challenge afterward.

Carter told an international security conference in Bahrain that the battle for Mosul and for the Syrian city of Raqqa, the de facto capital of the extremists' self-described caliphate, would be crucial for defeating the group, which has claimed attacks worldwide.

"The seizure of these two cities is necessary to ensure the destruction of ISIL's parent tumor in Iraq and Syria — the primary objective of our military campaign — and put ISIL on an irreversible path to a lasting defeat," he said, using another acronym for ISIS.

He did not predict how long it might take for Iraqi forces to prevail in Mosul, but he sounded a note of optimism.

"This is a complex mission that will take time to accomplish, but I am confident that ISIL's days in Mosul are numbered," he said in Bahrain.

On Saturday, an Iraqi commander said reinforcements have been sent to eastern Mosul after a major IS counterattack drove troops back earlier in the week. Iraqi forces have only captured a handful of eastern Mosul neighborhoods since launching the offensive in mid-October.

Carter, whose tenure as defense secretary will end in January if his designated successor — retired Marine Gen. James Mattis — is confirmed by the Senate as expected, also made the case for keeping U.S. forces in Iraq even after IS is dislodged from Mosul.

"Beyond security, there will still be towns to rebuild, services to re-establish, and communities to restore," he said in Bahrain. The extremists, he predicted, will attempt to survive by reinventing themselves "in some other shape or form" after they lose their grip on Iraq and Syria.

Left unsaid was a possible change in course under Donald Trump when he takes office next month.