surround and cordon off the city, then gradually tighten the circle in a process that could take months. In a similar situation, American forces would maneuver into the heart of the city, much as they did in their assault on Baghdad in 2003. But Iraqi forces — who do not have the same kind of battlefield support, particularly high-quality medical care — have been far more risk-averse and deliberate in their operations.
A dozen Iraqi Army brigades, each of which includes anywhere from 800 to 1,600 troops, have been gathering at Qaiyara Airfield West, an Iraqi base 40 miles south of Mosul. Kurdish pesh merga fighters, who are positioned to the north and east, will also help isolate the city.
The eventual assault into Mosul will be carried out by Iraq’s counterterrorism service, whose commandos have been trained by American Special Forces and are the country’s most reliable and proficient fighting force. Iraq’s federal police and some Army units will also join the push into the city.
The United States military is poised to influence the battle in potentially decisive ways. Apache attack helicopters equipped with Hellfire missiles have been striking targets in northern Iraq, and American and French artillery can be positioned to provide support. American Special Operations commandos have also been active in northern Iraq.
American intelligence analysts estimate that 3,000 to 4,500 fighters remain in Mosul, a mixture of Iraqi militants and foreign recruits who have been steadily dropping under a barrage of coalition airstrikes over the past several months. One notable loss for the Islamic State was Omar al-Shishani, a Chechen and one of the group’s top field commanders, who was killed in an airstrike in March in a town south of Mosul.
“Their backs are against the wall,” Lt. Gen. Sean MacFarland, who recently stepped down as the overall commander for the United States’ operations in Iraq and Syria, said in a telephone interview. He added that the militants were having trouble drawing new recruits to Syria and Iraq because of tougher border checks by Turkey. “They’re not the ISIS that drove there a couple of years ago,” he said.
Even so, the Pentagon and its allies in the American-led coalition are bracing for a tough fight against an enemy that has burrowed a network of tunnels throughout Mosul, dug trenches and filled them with oil, and planted improvised explosives so densely they resemble minefields.
Mr. Obama’s aides say he would like to be able to hand the Islamic State issue to the next president with the Iraq portion at least on the right trajectory, if not solved.
The president’s supporters say he does not want to pass to his successor a terrorism threat as bad as or worse than the menace Mr. Obama faced from Al Qaeda when he became commander in chief.
“He talks about being a relay swimmer, about the idea that he’s got this moment where he has to turn things over,” said Derek Chollet, a former assistant defense secretary in the Obama administration.
But Iraq has a way of confounding even the best-laid plans, and the president’s critics see it differently. “Suppose there are a million refugees from Mosul. What are they going to do?” said Eliot A. Cohen, who was a State Department counselor in the Bush administration. “I’d like to see Mosul retaken, but one thing we all learned from Iraq is that things never simply break your way.”
American military officials acknowledge that retaking Mosul will not defeat the Islamic State, because Raqqa, Syria, the group’s de facto capital, is the heart of its self-declared caliphate.
“It is not the end of the caliphate if Mosul falls,” General MacFarland said. But “if Raqqa falls, the caliphate as we know it really begins to unfold.”
For all its complexity, however, Mosul presents an opportunity for the White House that may not be readily at hand in Syria. After nearly eight years in Iraq during the Bush and Obama administrations, the American military knows the terrain well and has a network of large and well-secured Iraqi bases it can use to assist in the fight. It also has a sizable proxy force: the thousands of Iraqi and Kurdish troops the Americans have trained.
Some officials expect the militants to pull back from the eastern side of Mosul, which is divided by the Tigris River, and instead defend the west bank, where the government center is. The west bank has many narrow streets, making it difficult for tanks and artillery to operate.
A key question is who will secure the city once the Islamic State is driven out.
Iranian-backed Shiite militias, which are a politically powerful movement in Iraq, have been accused of detaining and killing hundreds of men who fled the fighting in and around Falluja this year. To guard against human rights abuses, Prime Minister Haider al-Abadi is expected to give those militias a role well outside the city.
The Kurds have already said they will not send their forces into Mosul once it has been secured. Nor does the United States want Iraq to keep its largely Shiite army inside the city any longer than it needs to.
As a result, security will have to be provided by thousands of local police officers, including many who have yet to be trained, as well as former officers who joined the Iraqi Army after the Islamic State attacked and now need to be recalled to their police units. More than 20,000 tribal fighters, whom the Iraqis and Kurds are vetting, will also help with security.
This plan has the virtue of giving the lead to local security forces, but it also means that one of the most delicate phases of the operation is being entrusted to fighters who are lightly equipped and whom the United States will not be directly advising.
A main concern for critics is that there is no plan in Iraq for how to govern Mosul and the surrounding Nineveh Province. This has prompted fear that retaking the city could aggravate the tensions between the predominantly Sunni population of Mosul and the Shiite-dominated government in Baghdad that fueled the rise of the Islamic State in the first place.
“There is no agreement about anything after the liberation,” said Atheel al-Nujaifi, who was the governor of Nineveh Province when the militants charged into Mosul in 2014. “It is very dangerous.”
Mr. Nujaifi is promoting a plan to give the region around Mosul far greater autonomy. But there are no indications that the Iraqi government will go along with that degree of decentralization.
While some Pentagon aides are worried, others in the Obama administration say that help from the United States will enable the Iraqis, Kurds and various other groups in Nineveh to figure out a political plan, in part by connecting the disparate factions, including Mr. Nujaifi’s successor as governor, Nofal Agoob.
But carving up the political spoils is not the only challenge.
Of the two million people who resided in Mosul before it was seized by the Islamic State, aid organizations estimate that about 1.2 million remain. Humanitarian assistance groups are already stretched thin from dealing with operations to recapture towns outside Mosul.
Though residents are being urged to stay in their homes, civilians fleeing the fighting could number in the hundreds of thousands. Some aid groups estimate that as many as a million people could be displaced by fighting to recapture the city, creating a daunting humanitarian task that the United Nations and other organizations say they are not yet ready to deal with.