Congolese rebels surrendered on Tuesday to end a bloody 20-month uprising offering tentative hopes of peace in one of the world's deadliest conflicts.

The M23 rebel movement capitulated under an onslaught from a renewed Congolese army backed by 3,000 UN fighters. Captured or forced to flee, the rebels declared a ceasefire and said they were ready to disarm and demobilise to pursue a political settlement.

Congolese soldiers celebrated noisily after what appeared to be a rare loss of face for Rwanda's president, Paul Kagame, who is accused by the UN of providing military and financial support to the M23.

But experts warned that instability in the mineral-rich eastern Democratic Republic of the Congo was far from over, with ethnic tensions persisting, myriad armed groups still at large, and Rwanda potentially able to find a new proxy.

The rebels' demise came with bewildering speed after Congolese and UN troops stepped up their offensive when peace talks stalled again last month. The Congolese military seized control of more than six towns in just a matter of days, cornering the insurgents in heavily wooded hills on the border with Uganda and Rwanda and, on Tuesday, driving them out of their last two strongholds.

Lambert Mende, a DRC government spokesman, declared "total victory" and said about 100 rebels had been captured by government forces. "Tshanzu and Runyoni were taken by the army around 3am. Many M23 fighters are surrendering. Militarily, this is finished," he told Reuters.

The rebels were said to have deserted their positions, setting fire to munitions depots and military trucks before fleeing into forests. Some reports said the M23 leader, Sultani Makenga, escaped over the border into Rwanda. The Ugandan army said more than 80 M23 fighters had fled into Uganda where they were being held until a diplomatic decision was made on their fate.

The M23 was left with little choice but to lay down its arms. Bertrand Bisimwa, its leader, said: "The chief of general staff and the commanders of all major units are requested to prepare troops for disarmament, demobilisation and reintegration on terms to be agreed with the government of Congo."

Residents of Goma, a city of 1 million people that the M23 briefly seized last year, expressed cautious optimism that the group's demise could bring stability. "That they put down their arms and stopped fighting is a good thing," Diane Wamahoro, a 20-year-old waitress, told the Associated Press. "We are liberated – but I'm not sure it's the end of the M23."

Some 1,600km away in the capital, Kinshasa, thousands of women dressed in white marched down the central boulevard to parliament chanting songs praising President Joseph Kabila and the army.

Russ Feingold, US special envoy to the Congo and the Great Lakes region, said the issues of an amnesty and reintegration of rebels into the army were vital to ensuring a durable deal. "In a region that has suffered so much, this is obviously a significant positive step in the right direction," he told a briefing in Pretoria, South Africa.

The M23 are fighters who deserted the Congolese army in April 2012 after a mutiny. Its name refers to a peace deal in 23 March 2009 that a previous militia, the CNDP, accused Kinshasa of betraying. The insurgency has seen atrocities on both sides including mass killings and rapes, the use of child soldiers and 800,000 people forced to flee their homes.

The rebels' capitulation marks a dramatic turnaround less than a year after they captured Goma, the east's biggest city, and bragged of marching on the capital to topple Kabila. M23 officers could be seen swaggering around Goma's best lakeside hotels while UN peacekeepers were passive spectators and the DRC army fell into a drunken, defeated shambles, wreaking revenge on civilians.

The lightning reversal can be attributed to four reasons. First, humiliated by the loss of Goma, Kabila recalled dozens of officers to Kinshasa, shook up the command structure and ordered that soldiers be paid on time, reducing their temptation to loot.

Second, the UN, so impotent as Goma fell, created a 3,000-strong intervention brigade drawing on South African, Tanzanian and Malawian soldiers with tanks, helicopters and a mandate to go on the offensive. It has not gone unnoticed that South Africa's show of support for Kabila coincides with a deal to buy more than half the power generated by the world's biggest hydropower dam, which will cost at least $100bn (£62bn) to build on the Congo river's Inga Falls.

Third, the M23 was weakened by factionalism and infighting that saw one of its leaders, Bosco Ntaganda, known as The Terminator, turn himself in to the international criminal court earlier this year. But fourth and perhaps most importantly, experts say, the M23's backing from Rwanda and Uganda, which those countries repeatedly denied, had virtually dried up of late.

Regional analyst Jason Stearns blogged last week: "According to several reports from the frontlines, despite indications of some cross-border support in the Kibumba area, the M23 was largely left to its own devices. 'The Rwandans just wouldn't pick up their phone calls,' one source close to the M23 leadership told me."

This view was echoed by Ida Sawyer, a researcher and advocate in Congo for Human Rights Watch. "The most crucial aspect in the M23's defeat was Rwanda and the fact they did not provide the support they did in all previous operations," she said in Congo. "We have not documented any such support in the past two weeks."

Why did Rwanda cut ties and hang the M23 out to dry? Apparently western donors, for whom Kagame has long been a darling, finally ran out of patience and boxed him in. "It seems international pressure did make a difference," she added, citing a recent American decision to block military aid and public statements by John Kerry, and British foreign secretary, William Hague, US secretary of state. "Rwanda might try to back other rebellions in eastern Congo in the future but won't find it so easy."

But Sawyer warned that declaring peace in eastern Congo would be far too premature. "This is just the first step and there is still a long way to go. There are many other armed groups. We also need to see the arresting and bringing to justice of both M23 and Congolese army soldiers who have been responsible for war crimes and crimes against humanity."

Conflict in eastern Congo, fuelled by competition for gold, copper and cobalt, goes back more than two decades to the Rwandan genocide and has claimed millions of lives, earning the label "Africa's first world war". The M23 is merely the latest reincarnation of discontent among ethnic Tutsis and it would be no surprise if another rose to take its place.

Martin Kobler, head of the 19,850-member UN peacekeeping mission in Congo, said attention would turn to scores of smaller armed groups operating in the lawless east, including the Rwandan Hutu FDLR.

"We have teeth and we are using those teeth," Kobler said in Pretoria.

The FDLR, which includes some Hutus who fled from Rwanda after the 1994 genocide of 800,000 Tutsis and moderate Hutus, has long been used by the Rwandan government as a pretext for intervening in Congo to protect its own security.

Adekeye Adebajo, executive director of the Centre for Conflict Resolution in South Africa, said Goma had seen many reversals since the mid-1990s and the latest should not be seen as final. "This might be a temporary situation because the issues of ethnicity have not been resolved. Chasing the M23 out is not necessarily going to resolve the issue.

"Rwanda sees having a buffer zone in that region as important to its own security and it can easily recreate something like the M23. What happened is definitely a setback as far as Rwanda is concerned but Rwanda is playing the long game and always has."

Meanwhile, the rout of the M23 appears to vindicate the UN's decision to go from peacekeeping to peace enforcement after years in which the world's biggest operation of its kind, with some 20,000 personnel costing up to £1bn (£620m) a year, seemed to be treading water. Kobler, a German who served the UN in Afghanistan and Iraq, has been praised for providing a new sense of direction since taking over in June.

But Adebajo, himself a veteran of UN missions in Iraq, South Africa and Western Sahara, and author of the book UN Peacekeeping in Africa, played down suggestions that the brigade's success would set a new precedent for future operations. "The 3,000-strong brigade seems to have made a difference alongside the Congolese army but it's not a big force.

"If there is heavy fighting and the South Africans and Tanzanians suffer heavy casualties, there will be political pressure to withdraw. Many contributing countries are reluctant to put their troops in harm's way."

African leaders meeting in Pretoria congratulated Congolese government forces and the UN peace-enforcement mission in eastern Congo for "recapturing M23 strongholds and restoring government control". Kabila was at the meeting but Kagame was absent.