On 4 May 2015, Townsend became commander of the XVIII Airborne Corps. He was promoted to lieutenant general shortly before. Townsend became commander of Combined Joint Task Force (CJTF) – Operation Inherent Resolve (OIR) on 21 August 2016, replacing Lieutenant General Sean MacFarland. In this capacity he commanded US forces as they engaged in an air war (supported by special forces and limited Marine deployments plus material and intelligence support to bolster allied ground forces) against the Islamic State of Iraq and the Levant (ISIL). U.S. airstrikes killed tens of thousands of ISIL fighters and catalyzed enormous losses in territory for them. Under Townsend, the CJTF-OIR coalition together with allies from the Syrian Democratic Forces, the Iraqi Security Forces, and the Libyan Government of National Accord launched simultaneous successful offensives against ISIL's capitals in Syria, Iraq, and Libya respectively: the Raqqa campaign (2016–2017), the Battle of Mosul (2016–2017), and the Battle of Sirte (2016). By the end of 2017 ISIL no longer held any territory in Iraq or Libya, held very little territory in Syria, and was down to under ten thousand fighters in total. The Iraqi Parliament declared in December 2017 that ISIL had effectively been eradicated from Iraq, though ISIL insurgent activity continued regularly.