Ivory Coast strongman Laurent Gbagbo was captured by forces loyal to his rival Alassane Ouattara, who urged no reprisals or violence following the dramatic climax of a months-long crisis.
"I ask you to remain calm and show restraint," Ouattara, 69, the internationally recognized president of the west African nation, said in a televised address, while hailing "the dawn of a new era of hope".
He also announced the launch of "legal proceedings against Laurent Gbagbo, his wife and his allies," adding that "all measures are being taken" to protect them.
Gbagbo, 65, who had held power since 2000 and stubbornly refused to admit defeat in November's presidential election, also called for a laying down of arms in televised comments shortly after his capture.
Gbagbo was detained and taken to his rival's temporary hotel headquarters with his wife Simone and son Michel.
"The nightmare is over," Ouattara's prime minister, former rebel leader Guillaume Soro, said on the victorious camp's television channel, calling for any forces still loyal to Gbagbo to change sides.
The network showed footage of Gbagbo inside a room in the Golf Hotel along with several senior aides, wearing a vest, wiping himself down with a towel and then changing shirts. He appeared visibly tired but otherwise unharmed.
A fighter who witnessed his capture said Gbagbo had put up no resistance when finally confronted by one of the commanders of the pro-Ouattara forces.
"When he found himself face to face with Gbagbo, in front of his desk, the first thing Gbagbo said was "˜Don't kill me!'" said the witness, speaking on condition of anonymity.
Ouattara spokeswoman Anne Ouloto told AFP the former first couple had been brought to the Golf Hotel, where Ouattara's camp was for months besieged by Gbagbo's forces, at around 1:00 pm (1300 GMT), shortly after the arrest.
Speaking in New York, Ivory Coast's UN envoy Youssoufou Bamba vowed that Gbagbo would now stand trial.
"Mr. Gbagbo was arrested, he is alive and well and he will be brought to justice for the crimes he has committed," Bamba said, adding that only Ivorian forces were involved in his detention.
UN peacekeeping chief Alain Le Roy said Gbagbo and his wife were under the protection of UN police at the Golf Hotel amid fears of reprisals or summary justice.
"UN gendarmes are now ensuring the security of Mr. Gbagbo and his wife in an apartment in the Golf Hotel," Le Roy said. "To my knowledge most of the fighting has stopped but there are pockets of resistance."
UN chief Ban Ki-moon said Gbagbo's arrest came at the "end of a chapter that should never have been," as the world body confirmed about 800 dead in the conflict between the rival camps following the November election.
US President Barack Obama welcomed the "decisive turn" of events in Ivory Coast and the end of Gbagbo's "illegimate claim to power" as a victory for democracy.
"For President Ouattara and the people of Cote d'Ivoire, the hard work of reconciliation and rebuilding must begin now," Obama said.
Burkina Faso President Blaise Compaore regretted that it had taken so long for Gbagbo to be arrested, but added: "I think that Ivory Coast must regroup around President Alassane Ouattara to move toward reconciliation, toward an economic upturn."
Ouattara in his address said he wanted to create a truth and reconciliation commission to shed light on charges of human rights violations during the past four months of unrest.
After the capture, General Bruno Dogbo Ble, the head of Gbagbo's Republican Guard, called the UN to say he wanted to surrender and Le Roy said at least 200 Gbagbo fighters had laid down their weapons.
"It is an important step in the process, but we cannot call it euphoria. This is not over. It is extremely important that we maintain law and order inside Abidjan and the whole country," Le Roy said.
Earlier, witnesses reported seeing pro-Ouattara forces entering Gbagbo's besieged residential compound, from which they had been repeatedly repulsed, while French and UN armoured vehicles deployed on a road nearby.
Troops from the cocoa-rich nation's former colonial ruler France and from a UN peacekeeping force had been pounding Gbagbo's forces since Sunday in a bid to destroy the heavy weapons they were reportedly using against civilians.
A spokesman for the UN mission in Ivory Coast (UNOCI) said its peacekeepers and allies from France's Licorne force had aimed to destroy heavy weapons that were being used against civilians.
President Nicolas Sarkozy's office said the French leader had a lengthy phone conversation with Ouattara, a former deputy head of the International Monetary Fund, shortly after Gbagbo was arrested.
France said its military had taken part in the weekend raids at the UN chief's request, and firmly denied reports that its special forces had taken Gbagbo and handed him over to Ouattara's men.
The International Criminal Court's prosecutor has launched a preliminary investigation into the violence in Ivory Coast. Both sides have been accused of massacres during the stand-off and ensuing conflict, with mass graves reportedly found near Abidjan and hundreds killed or raped in the western town of Duekoue.