The M23 rebel group in the eastern Democratic Republic of Congo says it is ending its insurgency, hours after the government claimed military victory.
In a statement, the movement said it would adopt "purely political means" to achieve its goals and urged its fighters to disarm and demobilise.
The government said the last remaining rebels had either surrendered or fled across the border overnight.
At least 800,000 people have fled their homes since the conflict began in 2012.
A summit of African leaders on Monday night in the South African capital Pretoria agreed that the M23 should make "a public declaration renouncing rebellion" to allow a peace accord to be signed with the Congolese government.
Congolese Defence Minister Alexandre Luba Ntambo, after the meeting, said once the rebels had publicly abandoned their insurgency the government "would make a public declaration of acceptance of this". Five days later, a formal peace agreement would be signed, he added.
The BBC's Milton Nkosi in South Africa says, with its announcement on Tuesday, the M23 appears to have met the conditions of the African leaders.
While Ugandan President Yoweri Museveni was at the summit, Rwanda's Paul Kagame was conspicuous by his absence, our correspondent says. Rwanda's foreign minister was at the meeting, however.
The UN has regularly accused Rwanda and Uganda of supporting the M23, although both governments deny the allegation.
The US and other donors have cut aid to Rwanda over the allegations.
'Hit-and-run operations'
DR Congo Information Minister Lambert Mende said on Tuesday that Congolese special forces had driven the rebels out of their final hilltop strongholds near the Ugandan border.
Tanks and helicopters from a UN intervention brigade with a tough new mandate to "neutralise" rebel groups approved earlier this year have also been involved in recent fighting.
"We can say that it's finished. But you never know," Mr Mende told the BBC's Newsday programme. "Those who escaped can come with hit-and-run operations so we have to end everything politically so that we are sure our people can sleep quietly without any threat."
Rebel military chief Sultani Makenga was among those who had crossed the border either to Rwanda or Uganda, he added.
M23 leader Bertrand Bisimwa announced on Tuesday that "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".
Peace talks broke down in October in the Ugandan capital, Kampala, following two months of negotiations.
The Congolese army began a big offensive against rebel positions on 25 October, securing their last major stronghold at Bunagana on the Ugandan border last week.
The M23, made up of army deserters who are mainly ethnic Tutsis, was named after a 23 March 2009 peace deal signed by the government and a former militia.
The rebels accused the government of failing to live up to the terms of the agreement and took up arms in April 2012, at one point seizing the regional capital, Goma.
Eastern DR Congo has been wracked by conflict since 1994, when Hutu militias fled across the border from Rwanda after carrying out a genocide against Tutsis and moderate Hutus.
A number of rebel factions operate in the two eastern provinces of North and South Kivu.
The end of the M23 would send an intimidating message to the other groups, raising hopes of an end to two decades of conflict, BBC Africa security correspondent Moses Rono says.
Latest Stories
-
Volta Region movie industry stagnated, needs investors to push – stakeholders
2 minutes -
Petition against Chief Justice reflects broader public concerns about Judiciary – Joyce Bawa
3 minutes -
Northern Ghana won’t experience fuel shortage – NPA assures
18 minutes -
Calm restored in Ejura after mob attack on Police Station
22 minutes -
18-year-old herdsman remanded over murder of younger brother
23 minutes -
GSTEP 2025 Challenge: Organisers seek to support gov’t efforts to tackle youth unemployment
2 hours -
Apaak assures of efforts to avert SHS food shortages as gov’t engages CHASS, ministry on Monday
3 hours -
Invasion of state institutions: A result of mistrust in Akufo-Addo’s gov’t ?
3 hours -
Navigating Narratives: The divergent paths of Western and Ghanaian media
3 hours -
Akufo-Addo consulted Council of State; it was decided the people won’t be pardoned – Former Dep. AG
3 hours -
People want to see a president deliver to their satisfaction – Joyce Bawah
4 hours -
Presidents should have no business in pardoning people – Prof Abotsi
4 hours -
Samuel Addo Otoo pops up for Ashanti Regional Minister
4 hours -
Not every ministry needs a minister – Joyce Bawa
4 hours -
Police shouldn’t wait for President’s directive to investigate election-related deaths – Kwaku Asare
5 hours