WASHINGTON — As Iraqi forces launch their long-awaited campaign to retake the city of Mosul from the Islamic State, President Obama’s doctrine of aiding other countries militarily rather than leading every fight is facing its greatest test yet.

How well the Mosul campaign goes, not just the fighting over the coming days and weeks but the rebuilding of the city in the months after that, will help define Mr. Obama’s legacy as a wartime leader who sought to take the United States off the front lines of the counterterrorism war.

On Monday, in keeping with the president’s insistence that the Iraqis take the lead, the White House said that Prime Minister Haider al-Abadi was “calling the shots.” But the reality is that roughly half of the 5,000 American troops now in Iraq are likely to be involved in the operation, which could eventually require 30,000 Iraqi and Kurdish troops.

About 200 to 300 of the Americans are Special Operations commandos advising Iraqi and Kurdish troops — a mission that will put them a few miles behind the front lines, communicating with Iraqi soldiers via radio. A few dozen are forward air controllers, who are already calling in airstrikes against Islamic State targets, Lt. Gen. Stephen Townsend, the American commander in charge of the coalition in Iraq and Syria, said on Monday.