China is intensifying efforts to regain influence in Myanmar as its long-held dominance founders in the face of a transformation in its former army-ruled neighbour, experts say.
Dramatic reforms heralding Myanmar's emergence from the shadow of dictatorship have astounded the West and seen the former pariah state courted by a host of international suitors.
Observers say longtime ally Beijing had assumed the end of junta rule was merely cosmetic and has been left stumbling to define its role amid nervousness over the growing influence of foreign rivals.
"China was caught off guard and still has not been able to fully comprehend the magnitude of the change in this country," said a Myanmar analyst in Yangon, who asked not to be named.
The relationship between the Asian giant and its neighbour is under the spotlight this week with a visit to China by president Thein Sein, who shed his military uniform to become the country's first civilian leader in decades.
The trip includes talks with Chinese President Xi Jinping to set out future ties and comes at an "important" time, according to an interview with China's ambassador to Myanmar Yang Houlan, published on the embassy website Wednesday.
Yang said the two nations were faced with a "new factor" including the removal of US sanctions and activity by "outside forces", "some of which do not want to see the healthy, smooth and rapid development of Sino-Myanmar relations".
The visit underscores that Myanmar "recognises the importance of the relationship with China", said Derek Tonkin, former British ambassador to several Southeast Asian countries.
That would have been taken for granted just two years ago when Myanmar was still comfortably within Beijing's sphere of influence.
During the junta era the ruling generals, tarnished by mounting human rights abuses, were shielded from international opprobrium by China's economic might and its UN Security Council veto.
In return, Beijing was assured of a relatively stable neighbour and access to Myanmar's abundant natural resources such as metals, timber and gemstones, as well as involvement in numerous hydropower projects.
It has also benefitted from a gateway to the Indian Ocean, and is close to completing the construction of oil and natural gas pipelines linking the western Myanmar port of Kyaukpyu with China's Yunnan province.
Observers say fears over the sheer scale of Beijing's power helped spur the junta into relinquishing their grip, ceding to a quasi-civilian regime in 2011.
Thein Sein quickly asserted his independence, ordering the suspension of work on a hugely unpopular Chinese-backed mega-dam in 2011.
A "series of public relations disasters" has since dogged Beijing's efforts to reclaim its influence, said the Myanmar analyst, citing the televised "humiliation" of Myanmar drug gang leader Naw Kham before his execution in China last month.
But Beijing is now focusing attention on its network of interests in the resource-rich country.
One key area of concern has been northern Myanmar, where clashes between the army and Kachin rebels intensified earlier this year, a development analysts says has handed China an opportunity to reassert itself.
China has hosted negotiations between the two sides -- fighting since a 17-year ceasefire broke down in 2011 -- amid concerns the unrest could affect its oil and gas pipeline from the Indian Ocean to Yunnan province.
In the long term, Myanmar is unlikely to turn away from its neighbour, which accounts for the lion's share of foreign direct investment -- about 34 percent.
Even opposition leader Aung San Suu Kyi has suggested the relationship with Beijing is crucial.
The Nobel laureate drew flak from villagers in central Myanmar recently when she urged them to drop calls for the closure of a controversial Chinese-backed copper mine, saying it would harm the local and national economy.
"We have to get along with the neighbouring country whether we like it or not," she said