M23 rebels in the Democratic Republic of Congo have seized the eastern border town of Bunagana, the rebel group and local activists said on Monday, sending more than 30,000 civilians fleeing into neighbouring Uganda.

The Congolese army in a statement said Rwandan troops had occupied the town. Congo has repeatedly accused Rwanda of backing the M23, whose leadership hails from the same Tutsi ethnic group as Rwandan President Paul Kagame.

The Rwandan army and government did not immediately respond to requests for comment. Rwanda has previously denied playing any role in M23's recent attacks.

The capture of Bunagana marked a major setback for Congolese forces who said a day earlier that they had the insurgents on the run.

The United Nations and African Union voiced alarm about the mounting violence in a region where conflicts in the 1990s and 2000s cost millions of lives, mostly from disease and hunger, and spawned dozens of militias that remain active to this day.

Bunagana was an M23 stronghold during a 2012 insurrection that briefly overran the major city of Goma before Congolese and U.N. forces chased the rebels into neighbouring Rwanda and Uganda the following year.

The office of North Kivu's military governor on Sunday said Congolese forces had "routed" the M23 following attacks near Bunagana, which is one of the main crossings into Uganda.

But the M23 issued a statement on Monday saying they controlled the town. Two local activists confirmed that it had fallen to the rebels, while the army said it had fallen to Rwanda.

"Our troops have taken control of the city of Bunagana since the morning of Monday, June 13," M23 spokesperson Willy Ngoma said in a statement.

He said that taking the city had not been their goal but that they decided to do it after repeated attacks by the Congolese army and allied groups.

"We ask once again for President Felix Tshisekedi to seize this opportunity to put an end to the violence caused by this useless war and to open direct negotiations with our movement," the M23 statement said.

A government spokesperson could not immediately be reached for comment. Congo's government broke off negotiations with the M23 that had been taking place in Kenya in April.

'DESPERATE SITUATION'

The fighting caused more than 30,000 Congolese asylum seekers and 137 Congolese soldiers to cross into Uganda on Monday, Shaffiq Sekandi, Uganda's resident district commissioner for Kisoro district, told Reuters.

"They are all over, the streets are full, others have gone to churches, they are under trees, everywhere. It's a really desperate situation," he said.

The United Nations had previously said that 25,000 people fled the violence on Sunday.

A spokesperson for U.N. Secretary-General Antonio Guterres said he was concerned about deteriorating security in eastern Congo, including M23 attacks. The region has seen near-constant conflict since Rwanda and Uganda invaded twice in the 1990s.

African Union Commission Chair Moussa Faki Mahamat called for an immediate cessation of hostilities and for talks between Congo and Rwanda to resolve the growing diplomatic crisis.

General Sylvain Ekenge, the spokesman for North Kivu's military government, said that the takeover of Bunagana constituted an "invasion" by Rwanda which would incur consequences.

Tensions have risen between the neighbours in recent weeks, with accusations of strikes on both sides.

While Rwanda denies supporting the M23, it accuses Congo of collaborating with another militia group, the FDLR, founded by ethnic Hutus who fled Rwanda after participating in the 1994 genocide. Congo denies this charge.

During the 2012-2013 conflict, Congo and U.N. investigators accused Rwanda and Uganda of supporting the M23, which they denied.

On Monday, two senior Congolese security sources, who asked not to be named, also accused the Ugandan military of supporting the M23's offensive.

Uganda army spokesman Brigadier Felix Kulayigye denied any involvement."We are only closely watching what's going on from across the border and we have been in that position for months," he said.