Jens Stoltenberg, the NATO Secretary General, and Lt. Gen. Stephen Townsend, the XVIII Airborne Corps commanding general, discuss upcoming training events and Soldier readiness during Stoltenberg’s visit to Fort Bragg, N.C., April 5. (Photo by Sgt. 1st Class Alexander Burnett/ Army)

The Pentagon has tapped a veteran of its counter-insurgency wars in Iraq and Afghanistan to replace Lt. Gen. Sean MacFarland as commander of U.S. and allied military operations against the Islamic State in Iraq and Syria, military officials said.

Lt. Gen. Stephen J. Townsend, who now serves as commander of the XVIII Airborne Corps based in Ft. Bragg, North Carolina, will take command of Operation Inherent Resolve in August or September, officials said, speaking on condition of anonymity to discuss an appointment that has not yet been made public.

That makes Townsend the man who is likely to oversee the bulk of the fighting for the city of Mosul, in what promises to be a pivotal battle against the militant group. U.S. and Iraqi officials have not said when Iraqi forces will begin their assault in earnest on the northern city, which has been under Islamic State control since 2014. But it’s expected to begin as early as later this summer or fall.

LTG Stephen J. Townsend XVIII Airborne Corps Commanding General. (Courtesy of XVIII Airborne Corps) LTG Stephen J. Townsend, XVIII Airborne Corps Commanding General. (Courtesy of XVIII Airborne Corps)

A decisive victory in Mosul would deprive the Islamic State of its last major city in Iraq and would deal a major blow to the group’s claim of a flesh-and-blood caliphate stretching across Iraq and Syria. But if the operation stumbles, it would hand the militants a giant propaganda victory and would worsen the already significant political problems facing Iraqi Prime Minister Haider al-Abadi. Iraqi forces are already conducting operations in northern Nineveh province, where Mosul is located, but they have yet to launch an offensive on the city itself.

Failing to reclaim Mosul would also represent a significant setback for President Obama in his final months in office, as his top advisers scramble to ensure the president can achieve progress against the Islamic State.

While U.S. troops remain mostly in an advisory role in Iraq, the Mosul campaign could thrust them much closer to the front lines. For the first time in Mosul, U.S. commanders will be authorized to employ a series of new military tools, including Apache attack helicopters and placement of American advisers closer at the battalion level.

Townsend is not a stranger to Iraq. As a brigade commander in the country in 2007, Townsend, then a colonel, oversaw a major operation in which U.S. troops sought to clear insurgents from Iraq’s Diyala province, one of the country’s most volatile areas.

In his return to Baghdad, even more challenging than upcoming offensives in Iraq may be the expanding U.S. operation in Syria. There, a small number of U.S. Special Operations forces are on the ground trying to help Kurdish and Arab forces advance against the Islamic State. But that effort has been fraught with setbacks, just as the larger civil conflict has defied years of U.S. and international peace efforts.

The Obama administration is hoping that U.S.-backed Syrian forces will eventually be able to encircle and defeat the Islamic State in its Syrian capital, Raqqa. As it has been for MacFarland, it will be a major challenge for Townsend to leverage a tiny U.S. force to effect change on the complex Syria battlefield, with its dizzying array of opposition groups and the involvement of numerous outside countries.

In a previous command, Townsend oversaw one of the most restive areas of Afghanistan, when he served as a regional commander in the country’s border region with Pakistan. At the Pentagon, Townsend also headed the Joint Staff’s Pakistan-Afghanistan Coordination cell.