NAYPYIDAW, Myanmar — When Myanmar’s leader, Daw Aung San Suu Kyi, wanted to hold a peace conference to end her country’s long-burning insurgencies, a senior Chinese diplomat went to work.

The official assembled scores of rebel leaders, many with longstanding connections to China, briefed them on the peace gathering and flew them on a chartered plane to Myanmar’s capital. There, after being introduced to a beaming Ms. Aung San Suu Kyi, they were wined and dined, and sang rowdy karaoke late into the night.

A cease-fire may still be a long way off, but the gesture neatly illustrates how Myanmar, a former military dictatorship that the United States worked hard to press toward democracy, is now depending on China to help solve its problems.

The pieces all fell into place for China: It wanted peace in Myanmar to protect its new energy investments, it had the leverage to press the rebels and it found an opening to do a favor for Myanmar to deliver peace.