The first mission began on July 20, when a small team of combat engineers was tasked with helping an Iraqi engineer battalion establish security around a temporary bridge constructed over the Tigris River.

The bridge, southeast of the town of Qayyarah, is expected to be a key infrastructure point in the upcoming offensive for Mosul, a crucial test for Iraqi forces and their Western backers.

But the American engineers, in a departure from the longer-term advisory missions that characterized earlier campaigns in Iraq and Afghanistan, have spent only a limited number of hours a day with the Iraqi army battalion before falling back to its more fortified position near Makhmour for the night. The engineers’ work is now mostly complete.

It was short-duration, high-payoff,” said Col. Chris Garver, a spokesman for the U.S.-led military coalition.

The narrowly targeted mission, with limited battlefield exposure, is an illustration of the restricted role that American commanders are planning for U.S. ground forces in the Mosul operation.

According to senior commanders, U.S. advisers will make short visits to Iraqi battalion headquarters, sometimes for only a few hours, rather than embedding with the local troops for extended periods.

The planned ground role is a recognition of the difficult course U.S. commanders must navigate as they seek to provide Iraq’s military with needed support without inflaming tensions with Shiite militias or fueling perceptions that the already fragile Iraqi government is reliant on foreign power.

[Harrowing images show what war against the Islamic State on Iraq’s front lines looks like]

It is also borne out of a desire to avoid additional U.S. casualties. Already, three Americans have died in combat in Iraq since 2014.

If Iraqi troops succeed in swiftly smashing the militants’ grip on the city, it would bolster Iraqi Prime Minister Haider al-Abadi, who is grappling with a fiscal crisis and pressure from Shiite allies, and would also deliver a needed victory to President Obama before he steps down.

Douglas Ollivant, a former White House official who is a senior fellow at New America, a Washington think tank, said a limited ground role would help the Pentagon strike a practical balance in the Mosul operation. “We kind of have our hand on the throttle, and we don’t have to have Americans out there getting killed,” he said.

In a recent interview, Lt. Gen. Sean MacFarland, commander of U.S. and coalition troops in Iraq and Syria, suggested there would be a high bar in assessing the “risk versus reward” calculus for future advisory missions.

The closer you get to the forward edge of the battle of course the higher the risk,” MacFarland said. “And if the return on investment or the possibility of loss or injury to one of our service members is not justified by the military necessity, we won’t do it,” he said. “It’s going to be something that will be very present in our calculation.”

In private, other senior officers are even more blunt, making reference to troops they lost in earlier Iraq deployments. This time, they will place Americans in the thick of fighting only if the overall mission is at risk.

The Mosul plans are the latest illustration of the war-weary U.S. military’s preference for restraint in the battle against the Islamic State. Most of the Pentagon’s uniformed leaders served in Iraq during the bloody insurgent war that followed the 2003 invasion.

While U.S. Special Operations forces have already been advising elite counterterrorism troops and Kurdish peshmerga forces at their lower levels, the Qayyarah mission marks the first time since 2014 that U.S. forces have advised Iraqi army battalions in the field.

In April, Pentagon leaders approved MacFarland’s request for new military powers for the Mosul fight, including the authority to place advisers at the battalion level, employ Apache attack helicopters to support ground forces and use HIMARS long-range artillery. While the artillery system and helicopters have already been used, advisers had not yet been placed at the battalion level until this month.

American officials had expected that lower-level advisers would be necessary in the battle for Mosul because the city’s large size and its distance from Baghdad — more than 250 miles to the north — have the potential to stymie Iraqi troops.

In past battles against the Islamic State, U.S. officials were dismayed to see Iraqi units get bogged down for days at a time because of a lack of basic supplies. The problem can be as simple as a faulty air filter for a tank, MacFarland said.

There’s only so much you can tell by talking with people over the radio or flying over them. So we’ll go out and say, ‘Okay, let’s take a look-see what the problems are,’ ” he said.

While the Pentagon has not announced a timeline for launching an assault on the city, officials have hinted that it could begin in the late fall. By that time, MacFarland’s replacement, Lt. Gen. Stephen J. Townsend, is expected to be in command in Baghdad.

American officials have said that advisers sent close to the front lines would require a large entourage of protection and support, including teams providing medical and evacuation assistance, roadside bomb clearance and artillery.

Equally important to safety considerations is U.S. commanders’ desire to avoid upsetting Iraq’s already tense political environment. Abadi, facing widespread outcry over a string of bombings in Baghdad, is eager to show that local forces can deal a decisive blow to the Islamic State in the same city where they suffered a major defeat in 2014.

While American and allied air power has proven instrumental for the advance of Iraqi forces in battles in Fallujah, Ramadi and elsewhere, Abadi’s government has maintained that Americans are not needed in combat.

After eight years of occupation, Iraqis are remarkably and understandably touchy about anything that looks like occupation,” Ollivant said. If American troops are “out there on the front line with Iraqi troops and seeing Iraqi civilians, it has a different flavor to it,” he said.

U.S. officials are also keen to avoid igniting renewed conflict with the Shiite militias whose support has been crucial in helping Iraq push back the Islamic State. Some militia commanders have already threatened to take action against U.S. troops or facilities if Americans are seen in combat. Earlier this month, Shiite cleric Moqtada al-Sadr told his followers that U.S. forces are a legitimate target.