Bloodshed in Beirut, Paris, Sinai and elsewhere, as well as a resulting refugee crisis, understandably dominated discussion at this week’s G-20 Summit in Turkey. So it’s not surprising that the aftermath of ISIL’s latest wave of terrorism also overshadowed President Obama’s subsequent trip to the APEC (Asia-Pacific Economic Cooperation) summit in the Philippines as well as the ASEAN (Association of Southeast Asian Nations) summit in Malaysia. Indeed, in a summit declaration, leaders at APEC underscored the “urgent need for increased international cooperation and solidarity in the fight against terrorism.”

Fortunately, Obama has not allowed riveting events in the Mideast to completely reverse his “pivot” (rebranded as a “rebalance”) to Asia. Doing so might be a generational geostrategic mistake.

“In a world where we’re talking about ISIL and terrorism and the Middle East and Russia and Ukraine and all of that, China is by far the most important potential challenge — as well as potential partner — to the U.S. in the long term, and gets nowhere near the level of attention it actually requires because of the level of distraction that Americans presently have on other parts of the international stage,” Ian Bremmer, president and founder of Eurasia Group, a leading global political risk research and consulting firm, told an editorial writer before Bremmer’s Nov. 10 speech to the Economic Club of Minnesota.

Congress, candidates for president and voters shouldn’t lose focus, either. All should consider not just the economic but the diplomatic merits of the 12-nation Trans-Pacific Partnership (TPP) trade pact that awaits congressional approval. Bremmer, who criticized many of Obama’s foreign policy priorities, said the TPP would be “by far” Obama’s most important foreign policy legacy.

Just hammering out the pact has paid diplomatic dividends with multiple Asian allies who believe it keeps America engaged in the region and helps manage the rise of China (which is not part of the TPP).

Security issues loom, too. Obama was right to call for China to cease its bogus construction of reclaimed islands in the South China Sea and enter an arbitration process with neighboring nations. The U.S. isn’t openly taking sides between Beijing and regional capitals on territorial claims, but rightly backs the right of free navigation in the area. Underscoring its commitment, the U.S. has conducted naval exercises and recently dispersed about $250 million in military aid to allies. The administration’s clarity, not always seen in other regions, is bringing encouraging, albeit limited, results.

“Things are on the move and the U.S. is looking a little more positive and a little stronger in the region than they have in a number of years,” Sherry Gray, director of international programs at the Humphrey School of Public Affairs, told an editorial writer.

No one should harbor the illusion that managing China’s rise, passing and implementing TPP, and working through other known and unexpected challenges will be easy. But Obama’s pivot policy is a sound strategy, and his successor would be wise to build upon it.