Kenya said its security forces had taken control of the Nairobi shopping mall where Islamist fighters killed at least 62 people, and that police were doing a final sweep of shops early Tuesday after the last of the hostages had been rescued.
There was an eerie silence outside the mall after a day in which gunfire and explosions were heard in the Westgate mall. A trickle of survivors escaped the building throughout the day on Monday, but the fate of people listed as missing was unclear.
Somalia's al Qaeda-linked al Shabaab group has claimed responsibility for the attack, which began at lunchtime on Saturday. Kenyan officials say there were 10 to 15 attackers.
Kenya says all hostages freed in Nairobi mall siege, at least 62 dead
President Barack Obama offered US support, saying he believed Kenya - the scene of one of al Qaeda's first major attacks, in 1998, and a neighbour of chaotic Somalia - would continue to be a regional pillar of stability.
Kenyan security forces believed the end was in sight for the siege at the upmarket shopping mall in the capital, saying its forces were "in control" as the ordeal entered its fourth day.
A government official said there was no resistance from the attackers late on Monday night after a barrage of gunfire and blasts throughout the day, but that the security forces were cautious in case some attackers were hiding in the building.
"Our forces are combing the mall floor by floor looking for anyone left behind. We believe all hostages have been released," the Ministry of Interior said on Twitter.
The siege has followed a pattern of bursts of gunfire and activity followed by long lulls.
Patronised by well-to-do Kenyans and expatriates, Westgate mall epitomised the African consumer bonanza that is drawing foreign investment - from West and East - to one of the world's fastest growing regions.
Al Qaeda killed more than 200 people when it bombed the US Embassy in Nairobi in 1998. When fighters from its Somali ideological counterpart stormed the mall on Saturday, they hit a high-profile symbol of Kenya's economic power.
Obama, whose father was born in Kenya, said the United States stood with Kenyans against "this terrible outrage".
"We will provide them with whatever law enforcement support that is necessary. And we are confident that Kenya will continue to be a pillar of stability in eastern Africa," he said in New York.
Kenya has sent troops to Somalia as part of an African Union force trying to stabilise the country, which was long without a functioning government, and push back al Shabaab.
It has also suffered internal instability. President Uhuru Kenyatta, who lost a nephew in the weekend bloodbath, faces charges of crimes against humanity at the International Criminal Court for his alleged role in coordinating violence after disputed elections in 2007. He denies the charges.
Kenyatta has dismissed a demand that he pull Kenyan forces out of Somalia, saying he would not relent in a "war on terror".
British Defence Secretary Philip Hammond said he believed six Britons had died in the attack. Other known foreign victims are from China, Ghana, France, the Netherlands and Canada. Kenyan officials said the total death toll was at least 62.
Kenya believes there are also foreigners among the attackers, with military chief Julius Karangi saying they came from all over the world. "We are fighting global terrorism here," he said, without giving their nationalities.
US authorities are urgently looking into information given by the Kenyan government that residents of Western countries, including the United States, may have been among the attackers, US security sources said.
White House deputy national security adviser Ben Rhodes said he had no direct information that Americans had participated in the attack, but expressed US worries.
"We do monitor very carefully and have for some time been concerned about efforts by al Shabaab to recruit Americans or US persons to come to Somalia," Rhodes told reporters travelling with Obama to the United Nations in New York.
Interior Minister Joseph Ole Lenku said the terrorists had set fire to mattresses in a supermarket on the mall's lower floors and his ministry later said the blaze was under control. Two attackers were killed on Monday, taking the total of dead terrorists so far to three, he told a news conference.
Speculation rose about the identity of the attackers. Ole Lenku said they were all men but that some had dressed as women.
Despite his comments, one intelligence officer and two soldiers told Reuters that one of the dead terrorists was a white woman. This is likely to fuel speculation that she is the wanted widow of one of the suicide bombers who together killed more than 50 people on London's transport system in 2005.
Called the "white widow" by the British press, Samantha Lewthwaite is wanted in connection with an alleged plot to attack hotels and restaurants in Kenya. Asked if the dead woman was Lewthwaite, the intelligence officer said: "We don't know."
A spokesman for al Shabaab warned they would kill hostages if Kenyan troops tried to storm their positions. "The mujahideen will kill the hostages if the enemies use force," Sheikh Ali Mohamud Rage said in an online audio statement.
From Mali to Algeria, Nigeria to Kenya, violent Islamist groups - tapping into local poverty, conflict, inequality or exclusion but espousing a similar anti-Western, anti-Christian creed - are striking at state authority and international interests, both economic and political.
John Campbell, a former US ambassador to Nigeria, said he believed insurgents such as those who rebelled in Mali last year, the Nigerian Boko Haram Islamist sect and the Nairobi mall raiders were also partly motivated by anger with what he called "pervasive malgovernance" in Africa.
"This is undoubtedly anti-Western and anti-Christian but it also taps into a lot of deep popular anger against the political economy in which they find themselves, in which a very small group of people are basically raking off the wealth," he said.