NAYPYIDAW, April 25 (AFP) - Former UN chief Ban Ki-moon on Tuesday urged the Myanmar military to halt violence in the conflict-racked country and engage with its opponents to end the bloody crisis.

Myanmar has been in turmoil since the military ousted civilian leader Aung San Suu Kyi's government in February 2021, sparking fighting across swathes of the country and tanking the economy.

Diplomatic efforts to resolve the crisis have stalled, with the junta ignoring international criticism of its brutal crackdown on dissent and refusing to engage with its opponents.

The military "must take the first steps", Ban said following a two-day trip to Myanmar where he met junta chief Min Aung Hlaing and senior military officials.

Ban also said the National Unity Government (NUG) -- a shadow administration dominated by lawmakers from Suu Kyi's party which is working to overturn the coup -- must be part of any "lasting solution".

The military has shown no willingness to engage with its opponents, including the NUG, which it has designated as a "terrorist" organisation.

Rights groups accuse the junta of massacres, torching villages and using air and artillery strikes to punish communities suspected of harbouring its opponents.

A military airstrike on a village in a resistance hotspot this month killed more than 170 people, according to media and locals.

The junta justified its power grab with unproven allegations of fraud in 2020 polls won resoundingly by Suu Kyi's party, and has promised to hold fresh elections.

"Holding elections under current conditions risks further violence and division, and the results not being recognised by the people of Myanmar," Ban said.

The statement made no mention of whether Ban had sought a meeting with Suu Kyi, who is currently serving a 33-year jail term following a series of closed-door trials that rights groups say were a sham.

Ban's visit made the front page of the state-backed Global New Light of Myanmar on Tuesday, which did not mention his calls for dialogue and a halt to violence.

He and junta chief Min Aung Hlaing had "exchanged views on the latest progress of Myanmar and cordially discussed it with constructive attitudes", the paper said, without providing details.

Ban visited Myanmar in his capacity as a member of "The Elders" group of world leaders founded by Nelson Mandela, which works to promote peace and defuse conflicts.