(CNN) -- After days of heavy fighting, forces loyal to Ivory Coast's Laurent Gbagbo laid down their arms Tuesday, and the self-declared president was negotiating the terms of his surrender, his foreign minister said.
Calm was reported Tuesday afternoon in Abidjan, the West African nation's largest city and the center of the battle between Gbagbo's military and those loyal to his rival, Alassane Ouattara, who is recognized internationally as the legitimate president.
"We must now do what we can do to have lasting peace," said Alcide Djedje, the foreign minister, who participated in talks at the French ambassador's residence in Abidjan.
Two of Gbagbo's generals were in "the process of negotiating a surrender," French Prime Minister Francois Fillon told parliament Tuesday. A U.N. official said that Gbagbo asked for U.N. protection for himself during the negotiations.
Ouattara's camp said it was sticking to a demand it has made all along: that Gbagbo recognize Ouattara's victory at the polls, said spokesman Patrick Achi.
"I think it is something very important," Achi said. "The military fight is almost over. As soon as he surrenders, all the fighting will stop."
French Foreign Minister Alain Juppe said Ouattara wants Gbagbo to sign a letter saying he recognizes his rival as president.
In a phone interview with French news channel LCI, a man claiming to be Gbagbo said he would not sign the paper because he does not acknowledge his rival's victory and that he demands "the truth of the ballot box." But, he said, he is willing to meet with Ouattara.
He also said the French have inserted themselves into the war.
"My problem is not to stay in a building or not," the man said. "My problem is that we find an exit from this crisis."
A key question is whether Gbagbo will remain in the Ivory Coast, said Choi Young-jin, head of the U.N. mission in the country.
"Gbagbo had many options after the election, but he squandered his opportunities," said Choi, who has been speaking with Ouattara as well as Gbagbo's advisers. "I don't know what options he has now."
"I think he (Gbagbo) knows everything is over for him," said Youssoufou Bamba, Ivory Coast's ambassador to the United Nations. "His military forces have been defeated. He is alone now."
Bamba said Gbagbo should go on trial "because he has committed so much crime" against civilian and peaceful demonstrators.
But Kenyan Prime Minister Raila Odinga, who served as the African Union's main negotiator in Ivory Coast, said Ouattara and others should consider allowing safe passage for Gbagbo to Angola, South Africa or another country.
Choi said the combat is over and that only a few elements were out on the streets. An American resident of Abidjan, who did not want to be identified, said she could hear sporadic gunfire from her apartment but the heavy shelling and mortars had stopped.
Choi said Gbagbo was hunkered down in the basement of his Abidjan residence with his family. He said there were still guards posted around the house, but not many.
U.S. President Barack Obama called Tuesday for Gbagbo to "stand down immediately."
"Tragically, the violence that we are seeing could have been averted had Laurent Gbagbo respected the results of last year's presidential election," Obama said. "To end this violence and prevent more bloodshed, former President Gbagbo must stand down immediately, and direct those who are fighting on his behalf to lay down their arms."
Ouattara's forces entered Abidjan on Thursday after an offensive that swept across the country. When they arrived, the sporadic post-election violence that had plagued Abidjan for four months escalated into war.
By Tuesday, they had surrounded the presidential palace.
"We do not see why he shall not surrender," Achi said earlier, adding the new government may seek trial for Gbagbo in the International Court of Justice.
An Abidjan resident said state-run television, which has served as a powerful mouthpiece for Gbagbo, went dark Monday, a sign that Ouattara's forces had overrun the building.
Gbagbo's forces suffered a setback Monday when U.N. helicopters fired on one of its camps to prevent the use of heavy weapons against civilians and U.N. peacekeepers.
Djedje, the foreign minister, said the U.N. attack prompted Gbagbo's forces to stop fighting.
"Since there was no more ammunition and weapons, they decided to lay down the arms and negotiate a cease-fire," he said.
U.N. peacekeeping director Alain Le Roy told reporters the United Nations was not taking sides in the conflict, but had to act after three days of fire from Gbagbo's forces left four U.N. peacekeepers seriously injured.
"We are shooting at heavy weapons. We are not shooting at the presidency," Le Roy said.
The political chaos and violence has claimed hundreds of lives in Ivory Coast. In one of the bloodiest incidents yet, the International Committee of the Red Cross reported the killings of 800 people last week in the western cocoa-producing town of Duekoue.