"I don't anticipate that we will be asked to leave by the government of Iraq immediately after Mosul," Lieutenant General Stephen Townsend said.
The US commander was speaking at a press conference in Baghdad wrapping up a brief visit by the new Pentagon chief, Jim Mattis.
"I think the government of Iraq realises it's a very complex fight and they need the assistance of the coalition even beyond Mosul," Townsend told reporters.
They have so far retaken the eastern half of the city and on Sunday launched an operation aimed at flushing IS out of Mosul's west bank.
More From This Section
The coalition formed in 2014, after IS seized about a third of Iraq and declared a "caliphate", nominally includes more than 60 nations, but Washington's main partners are France, Australia, Britain, Italy and a handful of other countries.
The coalition has carried out more than 10,000 air strikes on IS targets in Iraq and Syria and played a significant role in retaking the territory lost three years ago.
The coalition has more than 9,000 personnel in Iraq, more than half of them Americans. They are deployed in an advisory capacity but have sometimes been drawn into combat.
"This is a partnership," said Mattis, a retired Marine general who commanded troops during the 2003 invasion of Iraq.
"There's been a lot of rocky times out here but there is no doubt from my discussions today the Iraqi people, the Iraqi military, the Iraqi political leadership recognise what they are up against and the value of the coalition," he said.
"Continued support for Iraq is very necessary," he said in a statement.