(CNN) — Police and gunmen faced off Saturday at an upscale shopping mall in the Kenyan capital in an hourslong standoff that left at least 31 people dead, authorities said.
Several hours after the assault began, Al-Shabaab, an al-Qaeda-linked militant group based in Somalia, claimed responsibility for the bloodshed at the Westgate Mall in Nairobi.
"The Mujahideen entered #WestgateMall today at around noon and are still inside the mall," the Islamic extremist group said on its Twitter account.
Later, the group claimed on Twitter it was holding its ground inside the mall after more than than 10 hours of fighting. But authorities said they had cornered and "pinned down" the gunmen in the mall as of Saturday night.
"Attackers of Westgate shopping mall have been isolated and pinned down in a room by security forces in the ongoing operation," Kenyan police said on Twitter.
But the group said "there will be no negotiations whatsoever" at the mall. The extremists also said on Twitter that "all Muslims inside #Westgate were escorted out by the Mujahideen before beginning the attack."
One suspect was killed, said a Kenyan official who did not want to be identified because of the sensitivity of the information. There were also 100 people injured, the official said.
Another suspected gunman captured by police died from gunshot wounds he suffered in a shootout with police, the hospital said.
An unknown number of Americans were among those injured, but the majority of casualties are Kenyan, authorities said.
Concern over a hostage situation
As darkness fell in Nairobi, authorities said as many as 36 hostages are still being held by the gunmen in the mall, according to journalist Martin Cuddihy of the Australian Broadcasting Corp., who was at the scene and interviewed by CNN.
"Our security forces have taken control of the situation," said Joseph Ole Lenku, the national government's cabinet secretary for interior and coordination.
A security agent told CNN's Lillian Leposo at the scene that the violence was a terrorist attack.
"They have strong reason that these men are terrorists," Leposo said.
Kenya's Deputy President H.E. William Ruto said in a statement Saturday: "The government will bring the siege to end" at the mall. He called the gunmen's deadly attack a "cowardly and dastardly act," and he commiserated with families whose loved ones were injured or killed, he said.
"We will bring to account the perpetrators and their accomplices. Our security is important," Ruto said.
Americans were also injured in the attack, said Deputy State Department Spokesperson Marie Harf.
"We condemn this senseless act of violence that has resulted in death and injury for many innocent men, women and children," Harf said. "Due to privacy considerations, we have no further comment on American citizens at this time."
Somalia's president sent condolences Saturday to the people of neighboring Kenya.
"These heartless acts against defenseless civilians, including innocent children, are beyond the pale and cannot be tolerated," President Hassan Sheikh Mohamud said in a statement. "We stand shoulder to shoulder with Kenya in its time of grief for these lives lost and the many injured."
Chaos, screams and tear gas
In CNN interviews with several witnesses, one man having coffee in the mall recounted a chaotic scene that included exploding grenades.
What first sounded like a fallen table became repeated gunfire. When the gunshots became loud, people screamed and ran for exits, said Uche Kaigwa-Okoye.
People ran outside, but when they heard gunshots outdoors too, they ran back inside the mall, Kaigwa-Okoye told CNN.
Then, he and others realized the gunfire moved to his floor in the four-story mall, so they all ran for cover in the bathroom.
"We quickly entered the toilet and hid in one of the cubicles. We must have been 20" in number, he said.
"They had grenades, and it was really, really loud. All of us felt like they were close," he said of the explosions.
Tear gas was fired in the corridor, he said.
He saw people in his group texting to family and friends outside the mall, and word spread not to trust anybody in the mall, he said. "When the police started firing, you don't know who is firing," he said.
He and others escaped only when they saw 20 police officers on the floor, he said.
'There was blood throughout the supermarket'
One American inside the mall parking lot described hiding in stairwell with several people, including two people with superficial gunshot wounds, for more than an hour while the shooting was occurring, she told CNN.
Sara Head of Washington was in Kenya on business when she and her colleague were driven into the parking lot by their driver, she said. When they heard gunfire, they crawled underneath cars and hid behind them. They then ran into the stairwell, she said.
"There were several of us in there, but there were two people bleeding," she said.
Eventually, she and others in the stairwell saw the lights turned back on in the stairwell and the door to a nearby supermarket open, so they all fled the mall through the supermarket and its loading dock.
"There was blood throughout the supermarket as we exited, on the floor," she said.
Frightened visitors to the mall didn't even know whether it was safe to escape.
"It wasn't clear that it was OK to exit. I was sort of sheep following," she said.
The gunmen shot one person inside his car and two more people on the street as they entered the mall area, Leposo said.
Confusion continued about the origin of the gunmen, Leposo said. The attackers appeared to be of Somali origin, a Kenyan government source and Western diplomatic sources told CNN. But Leposo said there were reports that the gunmen were wearing masks, obscuring any identification.
Meanwhile, the army was mobilized to the mall, and two armored vehicles and an army helicopter joined police as both agencies were trying to secure the four-story mall floor by floor, Leposo said.
As distressed people are pulled out of the mall, they are surrounded by heavy security and are able to speak with family and authorities only, Leposo said.
The gunmen burst into the mall and shot indiscriminately, taking some people hostage, according to a senior Kenyan government source.
Several hours into the seige, gunshots inside the mall could still be heard by people outside the mall at about 10:30 a.m. Eastern, Leposo said.
Two years ago, there was a security alert sent the ex-patriot community to avoid the high-end mall because of reports of a planned attack at the mall, Leposo said.
Another witness Saturday recounted the outburst of bullets inside the mall.
"All of a sudden we heard some shots and people rushing," said Zulobia Kassam, who was having coffee at the mall. "We realized we were under attack. We rushed to the back, trying to hide and we heard random shots from everywhere -- upstairs, downstairs."
She said they stayed in hiding for about 40 minutes before sneaking out through a back door.
"People were petrified, crying, praying," she said. "We were told there were hostages being held."
'Let police do their job'
It was unclear how many hostages the attackers took, but police are trying to negotiate for their release and retake the building, according to the source.
Crowds dashed down the streets as soldiers in military fatigues crawled under cars to get closer to the mall, guns cocked.
Surveillance helicopters flew overhead.
Police took those rescued from the building to a secluded place for vetting to ensure they were not attackers. They streamed away from the mall in a straight line, arms raised up in the air.
The military asked local media not to televise anything live because the gunmen are watching the screens in the mall.
"We urge Kenyans to keep off Westgate mall, adjacent roads and its environs until further notice," the interior ministry said in a statement.
"We're doing our job to ensure that everyone is evacuated to safety," the ministry said. "This is a scene of crime, let police do their job."
Authorities said multiple shooters were at the scene and terrified shoppers were hiding inside the mall, which is popular among expatriates and the wealthy.
The high-end mall opened six years ago, and has more than 80 stores.
Village Market, another shopping center frequented by foreigners, shut down for the day as a precaution.