Updated

The elected president of this West African nation heralded "the dawn of a new era of hope" Monday when a bloody, four-month standoff ended with the capture of his rival, the longtime strongman who lost the vote but refused to give up power.

Video of former President Laurent Gbagbo being led into a room in a white undershirt was broadcast on television as proof of his detention. He would not sign a statement formally ceding power after losing a Nov. 28 election to economist Alassane Ouattara.

More than 1 million civilians fled their homes and untold numbers were killed in the power struggle between the two rivals that threatened to re-ignite a civil war in the world's largest cocoa producer. Gbagbo's security forces have been accused of using cannons, 60 mm mortars and 50-caliber machine guns to mow down opponents during the standoff.

"After more than four months of post-electoral crisis, marked by so many human lives lost, we are finally at the dawn of a new era of hope," Ouattara said in an address to the nation on radio and television.

Ouattara cut short speculation that Gbagbo would be delivered to the International Criminal Court at The Hague, calling for an Ivorian investigation into the former president, his wife and their entourage.

"Every measure has been taken to assure the physical integrity of Mr. Laurent Gbagbo, his wife and all those arrested," he said. "They will receive dignified treatment and their rights will be respected."

Ouattara also said he intended to establish a truth and reconciliation commission and called on all fighters to put down their arms.

President Barack Obama welcomed Gbagbo's capture, calling it a victory for the democratic will of the Ivorian people, who "have the chance to begin to reclaim their country, solidify their democracy and rebuild a vibrant economy."

Gbagbo, who ruled the former French colony for a decade, was pulled from his burning residence by Ouattara's troops following fighting earlier in the day. The pro-Ouattara forces had received support by French tanks and helicopters.

Residents of the commercial capital of Abidjan refrained from celebrating in public, still fearful of the many armed fighters prowling the streets and refusing to believe their leader had been arrested. Sporadic gunfire echoed across the city Monday night.

Gbagbo, 65, could be forced to answer for his soldiers' crimes, even though an international trial threatens to stoke the divisions that Ouattara will now have to heal as president.

Gbagbo's dramatic arrest came after days of heavy fighting in which French and U.N. helicopters fired rockets at arms depots around the city and targets within the presidential compound. Ouattara's final push began just after French airstrikes ceased at around 3 a.m. Monday. A simultaneous French armored advance secured large parts of the city, and pro-Ouattara troops entered the presidential compound just after midday.

"We attacked and forced in a part of the bunker," Issard Soumahro, a pro-Ouattara fighter at the scene, told The Associated Press.

He added that Gbagbo was tired and had been slapped by a soldier, but was not otherwise hurt.

Another pro-Ouattara fighter, Yaya Toure, said the assault was "hard in the beginning but we got up our courage to enter" the residence.

Gbagbo "tried to escape by the lagoon," Toure said, adding that the French forces in helicopters "cut off his escape route, so he came back to his residence."

"Then in the residence, we went in and took him," he said. "It wasn't the whites (the French) who took him — it was us."

Other pro-Ouattara soldiers wore a few smiles, but mostly the men continued to concentrate on clearing the city of armed gangs.

Witnesses at the nearby Golf Hotel said Gbagbo was brought in with his wife, son and about 50 members of his entourage.

"The nightmare is over for the people of Ivory Coast," Youssoufou Bamba, appointed by Ouattara as the country's U.N. ambassador, said in New York. Bamba declared that Gbagbo will be brought to justice.

In the western town of Duekoue, pro-Ouattara forces fired into the air in jubilation, panicking refugees who fled in all directions or fell to the ground in terror. In villages east of Duekoue, people danced in the streets, waving tree branches. In one village, young men paraded with the orange, white and green Ivorian flag.

"This is an end of a chapter that should never have been," U.N. Secretary-General Ban Ki-moon said. "We have to help them to restore stability, rule of law, and address all humanitarian and security issues."

Ouattara's ambassador to France, Ali Coulibaly, told France-Info radio that Gbagbo "must answer for the crimes against humanity that he committed."

Some critics of Gbagbo had accused him of clinging to power in part to avoid prosecution by the International Criminal Court.

Ivan Simonovic, assistant secretary-general for the U.N. High Commissioner for Human Rights, told reporters that teams from his office saw the bodies of around 400 people even before the wave of violence that culminated in Gbagbo's arrest.

The U.N. rights official says he discussed the importance of filling the security vacuum with Ouattara, 69, and his ministers during a visit to the country last week.

Ouattara has called for police to return to their posts, for all Ivorians to refrain from political reprisals, and announced severe punishment for those who retaliate, Simonovic said.

"I think it is essential to break the cycle of impunity and retaliation," Simonovic said. "If after the conflict in 2002 we had established truth and accountability, perhaps we would have prevented what has happened now."

Geoffrey Robertson, a British-based human rights lawyer and former president of U.N. special court for Sierra Leone, said Gbagbo should be transferred to The Hague for investigation for launching an attack on the U.N. headquarters in Ivory Coast and against the civilians that the U.N. was protecting.

Richard Downie, an Africa expert at the Washington-based Center for Strategic and International Studies, said it will be difficult for Ivory Coast to put Gbagbo on trial, adding that it would "probably be a lightning rod for more unrest."

Ouattara "didn't want to come to power this way, through the barrel of a gun," Downie said. "He was elected fairly and freely. But this is the situation he was dealt. It's going to be incredibly difficult for him to bring the country together."

Ivory Coast was divided into a rebel-controlled north and a loyalist south by a 2002-2003 civil war and was officially reunited in a 2007 peace deal. The long-delayed presidential election was intended to bring together the nation but instead unleashed months of violence.

Gbagbo already had overstayed his mandate by five years when he called the fall election and won 46 percent of the runoff vote. When the country's election commission and international observers declared on Dec. 2 that he lost the balloting, he refused to step down.

The former history professor defied near-universal international pressure to hand over power to Ouattara. The two set up parallel administrations that vied for control of the onetime West African economic powerhouse.

Ouattara drew his support from the U.N. and world powers. Gbagbo maintained his hold over the country's military and security forces who carried out a campaign of terror, kidnapping, killing and raping opponents.

Gbagbo wrapped himself in the country's flag as he took the oath of office at his inauguration.

"No one has the right to call on foreign armies to invade his country," Gbagbo declared in a TV address on Dec. 31. "Our greatest duty to our country is to defend it from foreign attack."

Ivory Coast gained independence from France in 1960, and some 20,000 French citizens lived there when the civil war broke out.

French troops were then given the task by the U.N. of monitoring a cease-fire and protecting foreign nationals in Ivory Coast, which was once an economic star but faded under Gbagbo.

Since late March, thousands of French and foreign nationals in Abidjan were evacuated by French tanks and helicopters to an army base on the edge of the city, where a refugee camp was set up for the privileged. Regular Ivorians were not permitted at the camp, and many ran out of food and water, forcing hungry people onto the streets during the fighting.

Gbagbo had described efforts against him as tantamount to a foreign coup d'etat.

The French government sought to distance itself from Gbagbo's arrest.

"France intervened at the request of the United Nations secretary-general to neutralize the heavy weapons that Gbagbo was using against the civilian population and against (U.N. peacekeepers)," said French Foreign Minister Alain Juppe. "After that, it was the Ivory Coast republican forces, including Mr. Ouattara's troops, who entered the presidential residence and arrested Mr. Gbagbo."

Other West African nations had considered military intervention to remove Gbagbo, but those efforts never materialized. Sanctions imposed on Gbagbo and his inner circle by the U.S. and European Union failed to dislodge him.

While the U.N. passed resolutions allowing its peacekeepers to intervene to protect civilians, anti-Gbagbo neighborhoods in Abidjan continued to be pummeled with mortar shells. So many people were killed that the local morgue had to stack corpses on the floor.

Ouattara tried to assert his authority from the Golf Hotel, protected by U.N. peacekeepers, and imposed an embargo on cocoa exports in a bid to strangle Gbagbo financially. In a desperation, Gbagbo seized control of foreign banks in Abidjan — prompting their flight and a liquidity crunch.

In the heartland of Gbagbo's Bete tribe, people were subdued. A small group of dancing youths in the village of Karriere shouted expletives about Gbagbo and chanted, "They fished Gbagbo out of his hole."

Other people repeated Ouattara's initials over and over, chanting "A.D.O. is our president!"

___

Associated Press writers Michelle Faul in Duekoue, Ivory Coast; Rukmini Callimachi in Indianapolis; Anita Powell in Johannesburg, South Africa; Anita Snow at the United Nations; Angela Charlton, Sophie Tetrel, Cecile Brisson and Julien Proult in Paris; and photographer Rebecca Blackwell in Abidjan contributed to this report.