In August 2024, Myanmar¡¯s ruling military junta was losing ground fast.

A rebel offensive had swept down from the Chinese border and was threatening Mandalay, the country¡¯s second-largest city. For the first time in decades, it looked like the military might collapse.

Fifteen months later, the junta has clawed back some territory and is about to hold the first polls since it seized power in a bloody 2021 coup that ousted Aung San Suu Kyi and kicked off a civil war.