Obama visits the Jade Emperor Pagoda in Ho Chi Minh City on May 24, during a weeklong trip to Asia
Carolyn Kaster—AP
May 26, 2016 5:55 AM EDT

When the Taliban’s leader, Mullah Akhtar Mansour, crossed the border from Iran into Pakistan on May 21 in a beat-up white Toyota sedan, President Barack Obama was busy in Washington preparing for a weeklong trip to Vietnam and Japan. But the President had planned ahead. Days earlier he had preapproved a strike against Mansour, and by the time the Pentagon informed Obama the hit was imminent, he didn’t need to do anything: a drone strike incinerated Mansour, his companion and the Toyota. Hours later Obama was on Air Force One, wheels up for Hanoi.

For Obama it is a sign of progress that the death of the leader of America’s longtime Afghan enemy could be taken in stride. Throughout his presidency, Obama has tried to shift America’s focus from the threat of jihadist terrorism to the long-term challenge of managing a rising China, moving from the Middle East to the Far East. But as often as not, Obama has been drawn away from Asia and the work of strengthening America’s position there as emergencies flared elsewhere. Trips aimed at bolstering regional alliances were canceled. Time and energy were devoted to the crescent of crisis stretching from Afghanistan to North Africa.

With eight months left in office, Obama has reached a kind of grudging compromise with the world. Where once he hoped to end the wars in Iraq and Afghanistan, he has stopped troop withdrawals from both countries and empowered the thousands of U.S. troops remaining there to engage in missions against the Taliban and ISIS. At the same time, he is capping years of behind-the-scenes diplomacy with a final push to strengthen America as a Pacific power that can balance the surging Chinese military and economic influence over the region. And he’s trying to lock in that legacy for his successor, whoever he or she may be.

Nothing shows Obama’s acceptance of the need for a long-term fight against jihadism more than the ongoing struggle in Afghanistan. Fifteen years after the war there began, and two years after he pledged to remove virtually all American forces before leaving office, the U.S. has 9,800 troops on the ground. Nominally they are in training roles, but in practice, more than 4,000 are special forces deeply involved in the effort to defeat the Taliban. The killing of Mansour (who was replaced by the cleric Mawlawi Haibatullah Akhundzada) makes that commitment even clearer. “It lets the Taliban know, ‘You may have thought [America] was eager to get out,'” says Husain Haqqani, a former Pakistani ambassador to the U.S., but “that’s not going to happen.”

Afghanistan may be the longest-running U.S. front against jihadism, but it likely won’t be the last. As soon as he got on the plane for Hanoi, Obama called Iraq’s President to help plan the fight to retake the city of Fallujah from ISIS–a battle that began two days later. The U.S. now has some 5,000 troops in Iraq to train government forces, up from the initial 275 Obama sent back into the country in 2014. “The Administration has come to the realization,” says Ambassador James Dobbins, Obama’s former special representative to Afghanistan and Pakistan, that Iraq and Afghanistan are “part of a larger challenge and that we’re going to need to stay engaged.”

For all that, you had only to look at the photograph of the President, tieless with sleeves rolled up as he sat on a plastic stool eating bun cha and drinking beer with celebrity chef Anthony Bourdain at a noodle shop in Hanoi, to know counterterrorism isn’t where Obama’s heart is. “Early in my presidency, I decided that the U.S., as a Pacific nation, would rebalance our foreign policy and play a larger and long-term role in the Asia Pacific,” Obama said in February at a meeting of Southeast Asian leaders in California. The Vietnam trip is just the latest move in that effort.

Obama isn’t the first President to try to orient America to the Far East. U.S. strategy since 1979 has been to incorporate China into the global system of trade and territorial rules codified by the U.S. and its allies after World War II. As China became the world’s second largest economy and expanded its regional territorial claims, Obama has moved to bolster U.S. military and economic counterweights in the region through alliances with other, smaller countries.

Vietnam is an emerging partner in the effort. On his first day in Hanoi, Obama announced the end of the U.S. arms embargo on the country, in place since the start of the war there in the 1960s. Hanoi agreed to tough U.S. conditions as part of the 12-country Trans-Pacific Partnership (TPP) trade deal Obama hopes to muscle through Congress in the lame-duck session after November’s election. And there’s talk of Vietnam allowing the U.S. to use military bases there to offset China’s increasingly aggressive maritime claims in the nearby South China Sea.

Obama’s growing military ties in the region, and his hoped-for victory in the TPP battle awaiting him in Congress, may contribute to the foreign policy legacy he wants to leave behind. But his reluctant commitment to the wars in Iraq and Afghanistan are likely to prove just as consuming to his successor as they were for him–Obama is, after all, now the country’s longest-serving “wartime President.” For all the talk of American decline, U.S. military and economic power make it a sought-after ally and intimidating opponent everywhere around the globe. Whoever takes over next January, and whatever their views of foreign entanglements, will face the same demanding, complicated and ultimately unavoidable world Obama has struggled for eight years to shape.

This appears in the June 06, 2016 issue of TIME.

Contact us at letters@time.com.

Read More From TIME

Related Stories

EDIT POST