Thousands were fleeing a Myanmar town bordering China on Tuesday after at least 30 people were killed in fighting between the army and ethnic rebels as Beijing called for an immediate ceasefire between the two sides.
The violence is some of the most intense to rattle the Chinese-speaking Kokang region since clashes in 2015 left scores dead and forced tens of thousands to flee into China.
The area is in northeastern Shan state, which has seen repeated bouts of heavy fighting between the army and a band of well-armed ethnic minority militias since November, undercutting a government peace bid.
The fighting has also raised fears of a repeat of 2015, when the displaced flooded across the border into China, raising tensions with Beijing.
In a statement released Tuesday, the army said it used heavy artillery to repel rebels who swept into Laukkai, the capital of the Kokang region, before dawn on Monday.
Insurgents from the Myanmar Nationalities Democratic Alliance Army (MNDAA) "failed" in their attempt to take Laukkai, the army said, adding civilians and "some army officers" died in a series of clashes around the town.
An army source requesting anonymity told AFP that "about 7,000 local residents are fleeing to the China side because of fighting".
On Tuesday Beijing appealed for both sides to halt the fighting.
"Relevant parties should cease fire immediately and restore order to the border areas as soon as possible," foreign ministry spokesman Geng Shuang told reporters.
The rebels, who were said to be wearing police uniforms when they made the surprise raid, suffered the heaviest losses with the military recovering 20 charred bodies it says belonged to fallen insurgents.
Communications have been cut around Laukkai but fighting continued on Tuesday morning, according to the leader of another rebel group allied with the insurgents in Kokang.
"Almost all residents from Laukkai town are fleeing," said Brigadier General Nyo Tun Aung from the Arakan Army (AA), estimating that thousands had left.
Many rebel groups in the border region share close cultural ties with China, speaking Chinese dialects and using the country's yuan currency.
Observers believe Beijing holds significant sway over the ethnic fighters and has a key role to play in peace talks that Myanmar's de facto leader Aung San Suu Kyi has tried to revive since coming to power in 2015.
The next round of negotiations is slated for March, but the date has slipped several times.
The Northern Alliance, a coalition of armed ethnic groups that includes the MNDAA and AA, has yet to join the peace process or sign a ceasefire that was reached with a myriad of other militias in 2015.