WASHINGTON — Myanmar was supposed to turn away from China and toward the West when the U.S. helped it transition from five decades of military rule.

The opposite is happening as the Southeast Asian country’s new civilian government fails to attract Western investment and Beijing goes on a charm offensive. China is offering economic and political support and a relationship free of the human rights concerns straining Myanmar’s ties elsewhere.

Also known as Burma, Myanmar represented a foreign policy success for President Barack Obama. He coaxed its powerful generals into ceding power by normalizing diplomatic relations and rolling back years of economic sanctions, paving the way for Nobel peace laureate Aung San Suu Kyi to take power after winning elections.

Suu Kyi’s historic struggle for democracy still evokes deep respect in Washington and European capitals, but 14 months running a civilian government has exposed her inability to bring peace to a country riven by ethnic conflict. She also has struggled to produce economic growth, hobbled by a lack of control over the nation’s still powerful military and a rigid management style.

Finding less love among the Western democracies, Suu Kyi is cautiously embracing closer ties to China.

“Amid the unpredictable challenges of this democratic transition, Western influence on Burma is waning, while Beijing is becoming more assertive,” Myanmar’s Irrawaddy news website said in an editorial.

Recent weeks have seen a flurry of China-Myanmar engagement. Suu Kyi met Chinese leader Xi Jinping at a Beijing summit in mid-May, her second visit there in the past year. Earlier, Myanmar’s titular president, Htin Kyaw, received a six-day state visit. Suu Kyi’s trip ended with an agreement with China to create an economic cooperation zone as part of the Asian giant’s “Belt and Road” initiative to connect with Asian and European markets.

Last weekend, Myanmar’s Navy held drills with Chinese warships. China’s state-run Global Times said the military cooperation demonstrated “political trust.”

That trust was expected to develop between Suu Kyi and the U.S.-led West.

Myanmar’s enduring fear of being dominated by its much larger neighbor, China, was one reason it improved ties with the United States in the first place. The Obama administration seized the opportunity while trying to “pivot” American foreign policy focus to Asia, hoping deeper relationships with its booming economies would provide the U.S. long-term strategic and economic advantages.

Derek Mitchell, the former U.S. ambassador who spearheaded Obama’s Myanmar rapprochement, said China was “stunned” when the country reached out to the West between 2011 and 2015. China is now making up for lost time, and capitalizing on President Donald Trump’s reduced attention for Myanmar, he said.

“It gave an opportunity for China to say, ‘See we’re on your border and we’re here to stay. You can’t count on the Americans,'” Mitchell said.

The State Department and White House did not respond to requests for comment.

Trump has started to reach out to Southeast Asian leaders, praising Philippines’ president Rodrigo Duterte for his deadly war on drugs and inviting him and Thailand’s prime minister, who took power in a coup, to the White House. Next week, Trump is hosting communist Vietnam’s prime minister.

Trump has yet to speak with democratic icon Suu Kyi.

For two decades, while Myanmar languished under repressive military rule, U.S. administrations and influential lawmakers adored Suu Kyi. Obama helped her transformation from political prisoner to national leader, fostering democracy on China’s doorstep. Republicans and Democrats touted the change as a victory for U.S. interests and values.

China, which sees Myanmar as a land bridge to the Indian Ocean, saw a strategic setback.

Yun Sun, a China expert at the Stimson Center in Washington, said Chinese policy experts even characterized it with a proverb: “The cooked duck flew out of the window.”

She said the proverb’s meaning is clear: “Myanmar was already in our pockets but somehow the Americans stole it from us.”

But Trump may have little political incentive now to prioritize U.S. ties with Myanmar.

“What are left now are the problems,” Sun added.

Problem one is sluggish economic growth. Washington has increased foreign aid and encouraged American investors by lifting sanctions. But the moves haven’t spurred economic activity in one of Asia’s last untapped markets.

Myanmar ranks 170th out of 190 nations in the World Bank’s ease-of-doing-business rankings, and third-worst globally for contract enforcement. Foreign investment dropped almost a third between April 2016 and April 2017, according to Myanmar government figures, with no new U.S. projects.

Problem two is human rights. Western nations in March backed a U.N. fact-finding mission on reported atrocities against Myanmar’s downtrodden Rohingya Muslims. Suu Kyi opposed the idea, tarnishing her international reputation.

Problem three is ethnic conflict. Suu Kyi has prioritized resolving Myanmar’s decades-long wars between the army and ethnic rebels, with little success. She tried again this week, bringing rebel groups together for talks with the government and military.

China has leverage with rebels near its border and says it supports peace. Resolution, however, hinges on Myanmar’s willingness to cede power to minorities and facilitate greater federalism.

On economic development, China faces wary Burmese citizens. Chinese projects have uprooted villagers and hurt the environment, factors that led Myanmar in 2011 to suspend a $3.6 billion dam primarily funded by Chinese energy interests. The suspension remains a sore point.

Mitchell, the former Obama envoy, warned of a larger strategic setback for the U.S.

Failing to consolidate Myanmar’s transition would tell the region’s autocratic governments they were right, he said, that “democracy doesn’t work in Asia.”

Story: Matthew Pennington