From the BBC
Ivorian leader Laurent Gbagbo has been detained in Abidjan and placed under UN police guard.
He was arrested as forces of the internationally-recognised successor Alassane Ouattara and French tanks advanced on his residence.
Mr Gbagbo had been refusing to cede power, saying he had won November's presidential election.
France said pro-Ouattara troops had detained him, but aides to Mr Gbagbo said it was French special forces.
UN Secretary General Ban Ki-moon said the detention of Mr Gbagbo had brought to an end months of unnecessary conflict, and the UN would support the new government.
UN peacekeepers had accused pro-Gbagbo forces of endangering the civilian population and asked France, the former colonial power, to take out the defiant leader's heavy weapons.
There have been allegations of atrocities by both pro-Gbagbo and pro-Ouattara forces, and the UN has reports of more than 1,000 people being killed and at least 100,000 fleeing the country.
Ivory Coast's permanent representative to the UN, Youssoufou Bamba, said Mr Gbagbo would stand trial. In London, UK Foreign Secretary William Hague said that if charges were brought, Mr Gbagbo should be tried in an orderly manner.
US Secretary of State Hillary Clinton said in Washington that the arrest of Mr Gbagbo sent a signal to "dictators" that "they may not disregard the voice of their own people in free and fair elections".
Armoured column
UN peacekeeping chief Alain Le Roy said Mr Gbagbo and his wife Simone were now under UN police guard at the Golf Hotel, where Mr Ouattara has his headquarters.
His son Michel is reportedly also with the couple at the hotel.
Mr Gbagbo was shown on pro-Ouattara TV sitting in a room, looking dazed but apparently uninjured, wearing an open shirt and white vest.
Whether it was Mr Ouattara's forces or the French who captured him is still open to question, the BBC's Mark Doyle reports from Abidjan.
According to our correspondent's sources, it was the French army who were in the lead heading towards the residence of Mr Gbagbo on Monday with a heavily armoured column.
But France's ambassador to Ivory Cost, Jean-Marc Simon, told AFP news agency: "Laurent Gbagbo was arrested by the Republican Forces of Ivory Coast."
An unnamed French government source added: "Mr Gbagbo was arrested by Mr Ouattara's troops, that is true, but not by French special forces, who did not go into the enclosure of Mr Gbagbo's residence."
Eyewitnesses quoted by AFP said pro-Ouattara forces had entered the presidential compound while French and UN armoured vehicles stood on a road leading to the complex.
The allegation that French special forces had seized Mr Gbagbo initially came from Gbagbo aide Toussaint Alain.
Speaking to Reuters news agency from Paris, he said: "Gbagbo has been arrested by French special forces in his residence and has been handed over to the rebel leaders."
Mr Gbagbo's special adviser, Bernard Houdin, told French TV separately that he would never have been taken without French help.
Escalating conflict
Forces loyal to Mr Ouattara launched an offensive from their stronghold in the north at the end of March, after months of political deadlock during which Mr Gbagbo refused to recognise his rival's election victory.
As they closed in on Mr Gbagbo's power base in Abidjan, UN and French attack helicopters targeted heavy weapons being used by his forces.
Mr Ban said UN and French forces had acted strictly within the framework of a UN resolution aimed at protecting the civilian population.
He said he wanted to speak to "President Alassane Ouattara" as soon as possible.
"This is an end of a chapter that should never have been," he added. "We have to help them to restore stability, rule of law, and address all humanitarian and security issues."
Mr Le Roy told reporters after addressing the UN Security Council that the chief of Mr Gbagbo's forces had called the UN to say that he wanted to surrender weapons.
As news of Mr Gbagbo's arrest spread through Ivory Coast's second city Bouake, thousands of people flocked to the centre to celebrate, the BBC's John James reports from the scene.
Young men honked their motorbike horns and women danced up and down the boulevard waving branches and singing.
"But this doesn't mean that the war is over," said one person. "Peace will not come if all the militia have not been arrested."