Before Monday's coup in Myanmar, the country's relations with China already were complicated by Chinese investments in its infrastructure and the Myanmar military's campaigns along their shared border.
The coup deposed national leader Aung San Suu Kyi a little over a year after Chinese President Xi Jinping made a show of support to her with the first visit by a head of state from Beijing to Myanmar since 2001 and 33 agreements on a wide range of issues.
The military's commander in chief, Min Aung Hliang, has taken charge of the new government under a one-year state of emergency.
Even if China played no role at all in ousting Suu Kyi, Beijing is likely to gain still greater sway over the country, analysts say. That's especially likely if the US and other Western governments impose sanctions to try to punish the regime.
At a briefing on the situation at the United Nations Security Council on Tuesday, the UN envoy for Myanmar condemned the coup and urged the council to support democracy in the country. But it was unclear if the council would issue a statement calling for restoration of democracy and release of all those detained by the military because the UN missions of China and Russia said they had to send it to their capitals for review.
Beijing's initial reaction to the coup was measured.
On Monday, Foreign Ministry spokesman Wang Wenbin said China was studying the situation, describing Myanmar as a "friendly neighbour." He urged Myanmar to properly handle the situation according to its laws and constitution and "maintain political and social stability." China has invested billions of dollars in Myanmar mines, oil and gas pipelines and other infrastructure and is its biggest trading partner. But while China's ruling Communist Party tends to favor fellow authoritarian regimes, it has had a fractious history with Myanmar's military, sometimes related to its campaigns against ethnic Chinese minority groups and the drug trade along their long, mountainous border.
It was partly a backlash against China's growing dominance of Myanmar's economy a decade ago that led the previous junta to shift toward democratic reforms and the civilian government that enabled Suu Kyi to join Parliament and become the nation's de facto leader, even as the military retained ultimate power.
Suu Kyi has shifted closer to Beijing in the past few years as she defended the military against condemnation of atrocities against Myanmar's Rohingya minority. That may have deepened military leaders' distrust, especially after their party suffered a resounding loss in recent elections.
"It was always a risk that the military would step in to try and shore up their power," Champa Patel, director of the Asia-Pacific Program at Chatham House in London said in an emailed statement.
"Their insecurity has deepened as (Suu Kyi) consolidated her power within the country and deepened ties with countries such as China." The coup came just three weeks after a visit by Chinese Foreign Minister Wang Yi, who met with Suu Kyi and also military officials in the capital, Naypyitaw. The visit was seen in part as an endorsement of the victory of Suu Kyi's party in the November election and partly as a signal Beijing would like to see faster progress on projects agreed to a year earlier.
Some have speculated that Beijing might have given a covert nod to the generals.
But while the coup may lead Myanmar's leaders to lean more heavily on support from China, supplier of most of their weapons and one of the country's biggest sources of foreign investment, researcher Zhao Gancheng at the Shanghai Institute for International Studies, says it was an unwelcome disruption.
"As a neighbouring country, I can't see anything good for China, given that all of China's investments and infrastructure construction need a stable environment," Zhao said. "China is concerned about this development," he said.
Regardless of what internal politics, antagonisms and personal ambitions might have driven Min Aung Hliang and other military leaders to seize power, China is bound to continue to expand its influence in Myanmar given the huge projects already under construction and the depth of Chinese involvement in businesses ranging from casinos, factories and property development to pipelines and ports.
Last week, the Chinese consortium leading a deep-water port project in Kyaukphyu, on the northwestern coast, began seeking bids for environmental assessments of the project. An anchor of Beijing's "Belt and Road Initiative" to build infrastructure across much of Asia linking its economy to the rest of the world, it will give China coveted overland access to the Bay of Bengal.
China has massive commitments to projects in mining, hydropower and other construction, part of the USD 21.5 billion it has pledged in investment in Myanmar. Suu Kyi's government had been slowly moving ahead on such projects, some of which face strong local opposition.
"China has strategic, vested interests in keeping Myanmar as stable as they possibly can," said Chris Ankersen, a professor at the NYU School of Professional Studies Center for Global Affairs. "It works to China's advantage to be seen as someone who has to be consulted." After nearly a decade of reforms and gradual opening of Myanmar's long-isolated economy, US and other Western businesses have made only tentative investments, usually with local or other Asian partners.