TEKNAF, Bangladesh (AP) — Almost 400 people have died in violence in western Myanmar that was triggered by attacks on security forces by insurgents from the Rohingya ethnic minority, Myanmar’s military said, as both sides exchanged charges of atrocities and thousands of Rohingya fled across the border to Bangladesh.

The death toll, posted on the Facebook page of Myanmar’s military commander Friday, is a sharp increase over the previously reported number of just over 100. The statement said all but 29 of the 399 dead were insurgents.

The statement said there had been 90 armed clashes, including an initial 30 attacks by insurgents on Aug. 25, making the combat more extensive than previously announced. The army, responding to the attacks, launched what it called clearance operations against the insurgents.

Advocates for the Rohingya, an oppressed Muslim minority in overwhelmingly Buddhist Myanmar, say security forces and vigilantes attacked and burned villages, shooting civilians and causing others to flee. Hundreds of civilians were killed, they say, posting photos, videos and details on social media as evidence.

The government blames the insurgents for burning their own homes and killing Buddhists in Rakhine. Longstanding tension between the Rohingya Muslims and Buddhists erupted in bloody rioting in 2012, forcing more than 100,000 Rohingya into displacement camps, where many still live.

As the refugees poured across the border into Bangladesh, a police official in Cox Bazar’s Teknaf area said that 21 bodies of Rohingya were found floating in the Naf River. Mohammed Mohiuddin Khan said two of them had bullet wounds.

On Thursday, three boats with refugees capsized, killing at least 26, police said.

Among those fleeing the violence was Sham Shu Hoque, 34, who crossed the border with 17 family members. He said he left his village of Ngan Chaung on Aug. 25 after it was attacked by Myanmar security forces who shot at the villagers. He said troops also used rocket-propelled grenades, and helicopters fired some sort of incendiary device.

Five people were killed in front of his house, he said. His family survived the attack but was told by the soldiers to leave. They took a week to reach Bangladesh, hiding in villages along the way, he said.

Estimates from local and police officials, intelligence sources and Rohingya leaders suggest at least 40,000 have crossed into Bangladesh. In the first six days after the Aug. 25 attacks, the International Organization for Migration said at least 18,000 Rohingya arrived in Bangladesh.

Bangladeshi border guards have tried to keep them out, but usually relent when pressured, and thousands could be seen Friday making their way across muddy rice fields. Young people helped carry the elderly, some on makeshift stretchers, and children carried newborns.

Some, carrying bundles of clothes, cooking utensils and small solar panels, said they had walked at least three days to get to the border.

The insurgent group that claimed responsibility for last week’s attacks, the Arakan Rohingya Salvation Army — ARSA —  said it acted to protect Rohingya communities.

It is nearly impossible to verify information issued by either the government or Rohingya sympathizers because Myanmar has barred most journalists from the area, except on limited official guided tours.

A human rights group, Fortify Rights, said that witnesses who escaped have supported accusations by Rohingya advocates that government security personnel and civilian vigilantes “committed mass killings of Rohingya Muslim men, women, and children in Chut Pyin village, Rathedaung township, on Aug. 27.”

“Survivors and eyewitnesses from Chut Pyin told Fortify Rights that soldiers and armed residents burned every house in the village,” the group said in a statement. It said survivors who returned to the village after the attackers left estimated the death toll there to be more than 200.

It quoted a 41-year-old survivor identified by the pseudonym “Abdul Rahman” as saying that soldiers killed and burned his brother along with other victims.

“We found (my other family members) in the fields,” it quoted him as saying. “They had marks on their bodies from bullets and some had cuts. My two nephews, their heads were off. One was 6 years old and the other was 9 years old. My sister-in-law was shot with a gun.”

Government accusations of atrocities committed by the insurgents are less detailed.

“Some of the ethnic natives while on their way were brutally butchered by the terrorists applying inhuman ways without any reason,” Friday’s military statement said. It said the insurgents were “using various terrorism tactics under well-hatched plots, attacking security forces on duty with superior force, mingling with villagers after running away from security forces in hot pursuit of them, cutting off communication lines, and spreading false information to get outside help.”

Most of Myanmar’s estimated 1 million Rohingya live in northern Rakhine state. They face severe persecution, with the government refusing to recognize them as a legitimate native ethnic minority, leaving them without citizenship and basic rights.

The U.S. group Human Rights Watch said it has obtained satellite images that suggest burning villages across a large swathe of Rakhine state. It said the locations match some of the accounts given by people who have fled into Bangladesh of settlements that have been attacked and destroyed by Myanmar soldiers, police and armed civilians.

“The government has to stop this offensive,” said Phil Robertson, deputy Asia director for Human Rights Watch. “It has to allow humanitarian assistance and let journalists into this area. We have to actually see what’s happened because quite clearly human rights violations have taken place.”

He said it was possible that violations had occurred on both sides.

The U.N. special rapporteur on the human rights situation in Myanmar, Yanghee Lee, expressed concern “that many thousands of people are increasingly at risk of grave violations of their human rights.”

The U.N. secretary-general also urged restraint by Myanmar security forces, a spokesperson said in a statement.

“The current situation underlines the urgency of seeking holistic approaches to addressing the complex root causes of violence,” spokesperson Eri Kaneko said.