Since 2016, when Aung San Suu Kyi's National League for Democracy came to power in Myanmar, China's relations with the Southeast Asian state have been surprisingly smooth considering Beijing's close ties with its former military regimes.
Previously widespread anti-Chinese sentiment, founded in controversial Chinese investments in natural resources, has largely dissipated. The shift reflects Suu Kyi's pragmatic leadership style and her isolation from the West, condemning her for her apparent indifference toward the Rohingya refugee crisis.
The NLD government has paved the way for the China-Myanmar Economic Corridor, a sweeping, multibillion dollar infrastructure scheme aimed at linking southwest China with Myanmar. China is also playing a largely constructive, though discreet, role in facilitating negotiations to end the 70-year civil war between the armed wings of minority ethnic groups and the central government.
One of China's intended strategic outposts in Southeast Asia, Myanmar serves as a prime example of Beijing's determination to consolidate influence and maintain dominance in its backyard. It also presents an opportunity for China to use its considerable clout in positive ways.
While the NLD is expected to win Myanmar's 2020 national elections, China's continued accommodation of the political status quo has important implications for reform in the country.
Recent heated discussions in parliament about constitutional revisions have hinged on the ruling party's push to allow Suu Kyi to become president by removing the provision that reserves 25% of parliamentary seats for the military.
The resulting hostility between civilian and military representatives has raised Chinese concerns that such a move could upend Myanmar's delicate political equilibrium.
A constitutional crisis may not trigger a military coup, as some fear, but the resulting uncertainty could further toughen the military's already hard-line approach toward the peace process and the Rohingya crisis, which could affect China's long-term interests in the country.
China has signaled it prefers gradual reform in Myanmar rather than the more radical change advocated by Western governments. Instead of urging civilian control over the military and prosecution for human rights abuses, Beijing believes that the generals should be coaxed to accept civilian dominance, citing a similar transition in Indonesia as an example.
From Beijing's standpoint, as long as the military is guaranteed its special role and privileges, it would have less reason to intervene in domestic politics.
China's realpolitik carries risks. The military's problematic record in handling ethnic conflicts and the Rohingya crisis have deeply alienated the international community. Beijing's steadfast defense of Myanmar -- particularly in the United Nations Security Council -- has enabled China to regain Myanmar's favor, reflected in a slew of new economic projects.
In the longer term, however, it could undermine these investments and China's international standing.
Without an effective mechanism to check the military's behavior and apply pressure, any belief that rewards alone could alter the conduct of Myanmar's armed forces is delusional. China needs to understand the long-term cost of its unequivocal support for the military, whether it is in training, arms sales and technical assistance or implicit support of the military's political role.
So far, criticism of China's increased economic activity in Myanmar has not escalated into an election issue, unlike in 2015, when Chinese projects provoked widespread resentment. The NLD government has been cautious about promoting Chinese investment, subjecting the proposed bilateral corridor scheme to stringent criteria.
On the Kyaukpyu deep sea port project in western Myanmar, for example, China's proposed investment was reduced by 80%, from $7.3 billion to $1.3 billion -- clearly to ward off accusations of potential Chinese exploitation. Its controversial $3.6 billion Myitsone dam project in Kachin State, suspended by the previous Myanmar government in 2011, remains in limbo.
Myanmar's willingness to follow U.S. advice on scaling down the economic corridor project has generated some negative feelings in Beijing about the duality of the NLD government's policy toward China. But Beijing appears ready to accommodate Myanmar's tougher approach, as long as it does not compromise China's national interests, for example on border security.
Overall, China is now displaying a more sophisticated understanding of Myanmar. It has learned the hard way that unilateral imposition of its wishes will only invite pushback. Having scaled back its ambitions and fostered contacts across the political landscape, it appears willing to accept Myanmar's return to a more balanced diplomacy.
From here, Beijing could use its considerable influence to temper the generals. A good place to start would be to rethink its military assistance.
Yun Sun is a senior fellow and co-director of the East Asia Program and director of the China Program at the Stimson Center in Washington, D.C.