Earlier this month Aung San Suu Kyi, Myanmar's foreign minister and de facto leader, wound up her first state visit to China. During the five-day trip, Suu Kyi met with President Xi Jinping and other senior government officials, and discussed an agenda crowded with a range of pressing issues including trade, development cooperation, the resumption of the controversial Myitsone dam project, and the ethnic conflicts engulfing the two countries' shared border.

The most significant thing about the trip might well have been the timing ,and not the modest outcome of the talks (enshrined in a typically colourless official joint press release). The trip was Suu Kyi's first outside Southeast Asia since she led the National League for Democracy (NLD) to a stunning victory at last November's election. It also preceded her first state visit to the United States (slated for September), a country which has done much to encourage the political and economic opening that has transformed Myanmar since 2011. The decision sent a clear message about the priority Myanmar's new government places on repairing its frayed relationship with Beijing.

During Myanmar's decades of military dictatorship and international pariah-status, China enjoyed a privileged status in the country, dominating trade and investment. All that came to an end in 2011, when President Thein Sein's government initiated an ambitious program of political and economic reform, distanced itself from China, and opened a new era in relations with Western governments.

The turning point (arguably) was the government's September 2011 decision to suspend work on the giant Myitsone hydropower dam, a $3.6 billion Chinese-funded project that had provoked fierce and widespread public opposition. To Beijing's chagrin, other significant Chinese investments were later cancelled or put on hold. Investment from the mainland nosedived.

Suu Kyi's China visit, however, put a seal on the NLD's slow but palpable 'rebalance' back towards the east. When the NLD government took office in April under Suu Kyi proxy Htin Kyaw, the first high-level diplomatic caller was none other than Chinese Foreign Minister Wang Yi, who pledged renewed Chinese support for vital infrastructure developments.

At the same time committed investments from China have rebounded, spiking to $3.3 billion in the fiscal year to April 2016, up from just $56 million in 2014. In December 2015, two consortia led by the state-owned CITIC Group Corp won bids to construct a strategic deep-water port and special economic zone at Kyaukphyu on the coast of Rakhine State.

Both nations have a great deal to gain from a close relationship. Myanmar's rich mineral deposits and geographic proximity (the two countries share a 2,204 kilometer border) make it a logical and necessary part of China's sphere of influence in mainland Southeast Asia. Myanmar's access to the Bay of Bengal also offers a shortcut for oil and gas imports from the Middle East, potentially reducing Beijing's reliance on seaborne shipments through the Straits of Malacca.

Aung San Suu Kyi, more of a pragmatist than some of her Western admirers might wish, has likewise expressed a willingness to accept Chinese help in realising her domestic goals. Chinese cash, distributed via bilateral loans and grants or multilaterally through the new Chinese-led Asian Infrastructure and Investment Bank, could help rebuild Myanmar's moribund infrastructure and jumpstart economic growth.

Beijing's cooperation will also be vital if Suu Kyi is to achieve what she has described as her top priority: ending the state of near-permanent conflict between the central government and Myanmar's raft of ethnic armed groups and rebel militias.

In practice, Suu Kyi faces thorny challenges in handling what is probably her country's most important and most delicate bilateral relationship. Anti-Chinese sentiment has been a simmering constant in Myanmar since the country's independence from Great Britain in 1948, a tendency that has been inflamed in recent times by perceptions of Chinese high-handedness and the lack of accountability surrounding Chinese mega-projects signed by the old military government. During a visit to Kachin State in May, local residents told me of their deep resentment over Chinese involvement in the rampant trade in jade and timber from conflict zones in Shan and Kachin states; an opaque business that has done little benefit to the people of Myanmar and has arguably perpetuated the conflicts there.

Suu Kyi's challenge is encapsulated by the question of what to do about the suspended Myitsone dam. Of the three main options (cancel the project, resume construction, or do nothing), none are immediately palatable for Suu Kyi. Halting the project outright would be a popular move, but would risk jeopardising Chinese support on economic development and the peace process. Likewise, resuming construction risks provoking a domestic backlash. Veteran Myanmar watcher Bertil Lintner has described such a move as 'political suicide for any Burmese government'.

But Suu Kyi's trip to Beijing showed that the two sides are slowly beginning to wiggle out of the impasse. Just before her departure, the state counsellor appointed a 20-member commission to review the dam's suspension and scrutinise other large-scale hydropower projects, communicating to Beijing that she will evaluate the project on its merits. China has also softened its stance on the dam, raising the prospect that China might agree to a mooted fourth option, in which the dam is cancelled but replaced with other smaller projects of benefit to both sides.

As an incentive, China has also shown that it is willing to help promote peace and stability along its border with Myanmar. During the talks in Beijing, China persuaded a number of stubborn rebel groups, including the armed-to-the-teeth United Wa State Army, to join a peace conference that Suu Kyi will convene in Naypyidaw on 31 August. In remarks reported by Xinhua, Xi Jinping promised Suu Kyi that his government 'will continue to play a constructive role in promoting Myanmar's peace process and work with the country to safeguard peace and stability in their border areas'. This came on top of a $3 million donation made by China to the peace process earlier this year; a recognition that peace and stability in Myanmar's borderlands are in both countries' interests.

Despite the warm tenor of the talks, Myanmar is unlikely to slip fully into China's orbit. While China is a reality that Myanmar's leaders can't afford to ignore, good relations with Beijing are merely one part of a balanced diplomatic diet that also includes strong ties with powers like the US, Japan, and the European Union. How Myanmar manages to balance these ingredients will form one of its main long-term foreign policy challenges.

Photo: Getty Images/Pool/Rolex Dela Pena