Kenyan security forces are locked in a standoff with gunmen who killed at least 59 people in a shopping mall in Nairobi, where the al-Qaida-linked militants are holding an unknown number of hostages.
Gunfire was heard on Sunday and the Kenyan government, who raised the death toll from 39 overnight, said it had evacuated more than 1,000 people. It would not say how many hostages were still in the mall but believed there were 10-15 attackers.
The Somali Islamist group al-Shabaab claimed responsibility for the attack on the Kenyan capital's Westgate mall, which is frequented by westerners as well as Kenyans. Several foreigners, including a Canadian diplomat, were among the dead.
The Kenyan president, Uhuru Kenyatta, facing his first major security challenge since his election in March, said the dead included very close members of his family.
The heavily armed attackers pulled up in several cars and shot their way into the most upmarket shopping centre in Nairobi, ordering Muslims out if they could prove their religion by reciting a prayer or answering a question on Islam. They started killing those who failed the test.
Shoppers, expatriates and rich Kenyans fled in any direction that might be safe: into back corners of stores, back service hallways and bank vaults. Over the next several hours, pockets of people poured out of the mall as undercover police moved in. Some of the wounded were being transported in shopping carts.
Following similar methods to the 2008 terror attack in Mumbai, the assailants barricaded themselves in different shops in the multistorey centre. One wounded gunman was arrested, but later died in hospital.
Al-Shabaab claimed responsibility via a Twitter account. The spokesperson claimed the atrocity was in response to the presence of Kenyan troops in Somalia: "The attack at #WestgateMall is just a very tiny fraction of what Muslims in Somalia experience at the hands of Kenyan invaders," the account stated. "For long we have waged war against the Kenyans in our land, now it's time to shift the battleground and take the war to their land." It continued by saying that the Kenyan government was "pleading with our mujahideen inside the mall for negotiations. There will be no negotiations whatsoever."
A senior government official said on his Twitter feed that more than 300 people had been wounded in the attack, which could prove a major setback for the east African nation which relies heavily on tourism.
The dead included children, and the wounded ranged in age from two to 78. Many victims were at a cooking competition when assailants stormed in with automatic rifles, witnesses said. Blood lay in pools in the mall. Shop windows were shattered.
More than 20 hours after the attack began, an unknown number of people were believed to still be inside, held by the attackers. The focus was on Nakumatt supermarket, one of Kenya's biggest chains.
As shoppers inside the mall made their way to safety, witness accounts of the attack began to emerge. The gunmen carried AK-47s and wore vests with hand grenades on them, said Manish Turohit, 18, who hid in a parking garage for two hours.
"They just came in and threw a grenade. We were running and they opened fire. They were shouting and firing," he said after marching out of the mall in a line of 15 people who all held their hands in the air.
Frank Mugungu, an off-duty army sergeant major, said he saw four male attackers and one female attacker. "One was Somali. The others were black," he said.
"We started by hearing gunshots downstairs and outside. Later we heard them come inside. We took cover. Then we saw two gunmen wearing black turbans. I saw them shoot," said Patrick Kuria, an employee at Artcaffe, a restaurant with shady outdoor seating.
Hannah Chisholm, a Briton visiting Nairobi, told the BBC she and 60 others barricaded themselves into a large storeroom. "We kept running to different places but the shots were getting louder so we barricaded ourselves along with about 60 others into a large storeroom," she said. "There were children with us as well as someone who had been shot. The gunfire was loud and we were scared but at that point we thought the gunmen were thieves so we assumed they wouldn't try to reach the storeroom."
Kenyatta said security forces were engaged in a "delicate operation," adding: "Our top priority remains to safeguard the lives of innocent people held up in this unfortunate incident."
Sporadic shooting continued for several hours after the attack, which began at around 12.30pm (1030 BST) on Saturday but had become a tense calm by the evening. Soldiers had joined the security operation backed by armoured personnel carriers.
"It's been quiet. They will be arranging how to attack," one paramilitary officer in green camouflage fatigues, with a rifle slung over his shoulder, told Reuters close to the mall.
One woman emerged on Sunday morning after she said she had been hiding under a car in the basement. She was holding one shoe and looked dazed, and was making a frantic phone call to her husband who later met her, a Reuters witness said.
Trucks brought a fresh contingent of soldiers from the Kenya Defence Forces to the mall shortly after dawn on Sunday morning.
Kenya has been braced for an attack of this kind since it controversially intervened in the war against al-Shabaab in Somalia by sending an expeditionary force in 2011. Since then Kenyan troops have succeeded in expelling the jihadists from the southern Somali port city of Kismayo and installing a former warlord friendly to the government in Nairobi.
The mall's ownership is Israeli, and security experts have long said the structure would make an attractive terrorist target.
Hospitals in Nairobi were overwhelmed by the number of wounded being brought in following the attack. However, officials said that Kenyans turned out in droves to donate blood and long queues had formed with further volunteers.
Kenyan authorities said they have thwarted other large-scale attacks targeting public spaces, including, in September 2012, the disruption of a major terrorist attack in its final stages of planning. They arrested two people with explosive devices and a cache of weapons and ammunition.
The anti-terror police unit boss Boniface Mwaniki said vests found were similar to those used in attacks that killed 76 people in Uganda who gathered to watch the soccer World Cup finals on TV in July 2010. Al-Shabaab claimed responsibility for those bombings, saying the attack was in retaliation for Uganda's participation in the African Union's peacekeeping mission in Somalia.