President Obama waves to guests while departing the White House on Aug. 31 to embark on a nine-day trip to Asia. (Win Mcnamee/Getty Images)

President Obama has staked much of his foreign policy legacy on boosting the United States’ presence in Asia. He has increased the number of Navy ships in Asia’s contested waters, forged ties with old adversaries and relentlessly pursued a massive and controversial Asia-Pacific trade accord.

But as he heads to the region for his 10th visit since 2009, the president’s effort to shift U.S. focus more decisively toward Asia remains a work in progress. And the unfinished and reversible nature of Obama’s signal foreign policy initiative raises an even larger question: In an age of political dysfunction at home, chaos in the Middle East and growing threats to the liberal international order, is it possible for any president to set a strategic foreign policy course and stick to it?

Obama’s trip to Asia, which begins Saturday in China with a Group of 20 economic summit and includes a first-ever presidential visit to Laos, offers one view of the challenges he has faced in pursuing his overarching vision.

“We see this trip as really bringing together a number of the president’s top priorities for the last 71/2 years,” said Ben Rhodes, a deputy national security adviser. The list of legacy-defining items includes managing the increasingly tense territorial disputes between China and its neighbors in the South China Sea, cyberespionage, climate and trade.

Just as daunting are the flash-point issues that could serve to deflect the president’s attention. In China, Obama is set to meet with President Xi Jinping, but his most closely watched meetings probably will be with Turkish President Recep Tayyip Erdogan, a critical and increasingly troublesome ally in the battle against the Islamic State.

“That’s going to be a very contentious meeting and drive as many headlines as anything he will do in Asia,” said Ian Bremmer, president of the Eurasia Group, a global political-risk consulting firm.

[U.S. is trapped between its allies’ ambitions in Syria]

In recent weeks Erdogan has blasted the United States for failing to extradite a U.S. resident whom the Turkish leader blames for a recent coup attempt. Obama also will need to address tension arising from the increasingly nasty shooting war in Syria between Turkey and Kurdish militia fighters — both critical allies in the fight against the Islamic State.

The meeting with Erdogan highlights a paradox for Obama. The White House has long insisted that the most consequential development of the 21st century is the rise of the Asia-Pacific region as an economic powerhouse. But the problems and opportunities in Asia rarely come with the pressing deadlines or the prospect of dire consequences of crises elsewhere in the world.

“We aren’t about to go to war in Asia,” said Patrick M. Cronin, senior director of the Asia-Pacific Security Program at the Center for a New American Security. “Things are pretty calm, and people are mostly doing business. But there is a lot of jockeying about who is going to determine the rules of the road in the area.”

For the moment, the main jockeying has been with China, which escaped the global recession largely unscathed and has been eager, as the world’s second-largest economy, to throw its weight around.

Increasingly, Chinese leaders have been unwilling to make concessions or show patience when it comes to settling territorial disputes with neighbors. The aggressive stance has provoked alarm.

“China took a situation where it had a relatively friendly Asia and turned almost everyone against it,” said Orville Schell, a longtime China scholar. “That’s a very bad place for China to be in. When China gets spurned or rejected, it loses face. It brings out the most obdurate side of the country, a very dangerous side.”

But the situation has opened up opportunities for the Obama administration to forge closer ties with former adversaries such as Laos, Vietnam and Burma that crave a larger U.S. presence as a counterbalance to China.

[China slams U.S.-South Korea military drills even as it stages naval war games of its own]

The administration’s flashiest initiative has come in Burma, also known as Myanmar, where the White House is seeking to build on the dramatic opening in what was previously a hermitlike military dictatorship. In mid-September, shortly after he returns to Washington, Obama will welcome Aung San Suu Kyi, a former political prisoner who now leads the government.

Other moves have drawn less attention. As part of the negotiations around the Trans-Pacific Partnership (TPP), the largest free-trade deal in a generation, the White House has extracted prom­ises from Vietnam to legalize labor unions.

The former communist foe also has begun conducting lower-level disaster-relief exercises with the U.S. military that administration officials say could blossom into larger military exercises and a more permanent American presence in Vietnam’s Cam Ranh Bay.

In Singapore, U.S. Navy ships and planes have become a regular presence. The U.S. military is working with Laos to remove ordnance left over from the Vietnam War. U.S. Marines are turning up regularly these days in Australia.

But the long-term success of the administration’s strategic shift to Asia hinges on the massive­

12­-nation trade deal, which is now hung up in Congress. The White House has spent years negotiating the agreement with allies, using the sometimes-contentious talks to set tougher rules on the environment, human trafficking and child labor.

“In many ways it is seen as a litmus test for whether or not the U.S. has staying power in the region . . . whether or not we can be counted on,” Rhodes said. “It would be seen as a significant setback for American leadership if we don’t move forward.”

The trade pact has broad support among Washington’s foreign policy establishment but has been bottled up in the Senate, where bipartisan resistance has mobilized against it. Today both Hillary Clinton and Donald Trump oppose the deal in its current form.

The Washington gridlock highlights how much Obama’s strategic pivot toward Asia is dependent on events beyond his control.

“Obama can say whatever the hell he wants about it in Asia,” Bremmer said. “His work is back home, where he’ll have to call in every possible favor and still get lucky in the lame-duck session to get it passed.”

Without the trade deal, it is not clear whether Obama’s moves — many of which are incremental and draw little interest in Washington — will be enough to engineer the historic shift he has been seeking.

Some analysts say the sum total of these smaller efforts has been enough. “It’s very difficult to get credit in the moment when strategic change is so incremental,” said Derek Chollet, a former Obama administration official and author of “The Long Game,” a book assessing the president’s foreign policy. “This is a play that will unfold over years.”

Others are more critical. “This is the most important foreign policy initiative he has tried to take over the last eight years,” Bremmer said. “But the legacy of the Asia pivot will be very weak if he can’t get the trade agreement.”