Updated Sunday 5:46 a.m. ET

The death toll at an upscale shopping mall in Nairobi has increased to at least 52, and civilians are still inside as militants exchange sporadic barrages of gunfire with Kenyan security troops outside.

"The priority is to save as many lives as possible," Joseph Lenku, Kenya's Interior cabinet secretary told AP early today. Kenyan forces have already rescued about 1,000 people, he said.

He said that five to 15 attackers are involved in the standoff, but declined to estimate the number of hostages.

Original Post, Saturday 8:38 a.m. ET

An upscale mall in Kenya was the scene of gunfire and explosions Saturday, after a group of attackers used assault rifles and grenades to strike during lunch hour in Nairobi. At least 39 people have died in the attack, Kenya's president says, along with more than 150 wounded.

American citizens are among the victims of the attack, although it's not yet clear what their status is. The attack shocked people in the mall, which is known for attracting wealthy and foreign shoppers.

"Rob Vandijk, who works at the Dutch embassy, said he was eating at a restaurant inside the mall when attackers lobbed hand grenades inside the building," the AP reports. "He said gunfire then burst out and people screamed as they dropped to the ground."

The AP reports that police arrived at the mall roughly 30 minutes after the attack began. A gun battle ensued; the situation was described as a standoff. Sporadic gunfire is being reported from the scene.

Updated at 7:40 p.m. ET: Some Attackers Still Holed Up In Mall

The Associated Press reported that 12 hours after the attack began, some of the attackers remained inside the mall holding an unknown number of hostages.

The New York Times reported:

Several Western intelligence officials said they suspected that the attack was carried out by the Shabab, an Islamist militant group based in Somalia that has carried out suicide attacks and beheadings inside Somalia and threatened Kenyan malls before. A confidential United Nations report on Saturday described the attack as "a complex, two-prolonged assault" with two squads of gunmen dashing into the mall from different floors at the same time and opening fire immediately.The Shabab sent out several Twitter messages after the massacre suggesting that its fighters were responsible for an attack they said represented "just a very tiny fraction of what Muslims in Somalia experience at the hands of Kenyan invaders." One message said the Shabab had warned the Kenyan government "that failure to remove its forces from Somalia would have severe consequences." Kenya sent troops into Somalia in 2011 to help fight the Shabab and to prevent violence from spilling over across the border the countries share.

Update at 4:42 p.m. ET: Kenya's President Says He Lost Family In Attack

"I know what you feel, having also personally lost very close family members in this attack," Kenyan President Uhuru Kenyatta told his nation in a statement Saturday night.

Speaking on live television in an address from the State House, he said the government will support those who suffered losses.

Kenyatta also praised Kenyans who responded to the attack by helping others.

"I commend those who volunteered by giving first aid," by donating blood, and by helping victims' family members, he said.

Kenyatta also sounded a note of defiance, saying that those responsible will be punished for what he called a "heinous" crime.

"Terrorism, in and of itself, is a philosophy of cowards," he said.

Update at 4:05 p.m. ET: Americans Among Victims, U.S. Says

U.S. citizens are among the wounded in Nairobi, the State Department says. In a statement issued Saturday afternoon, Deputy Spokesperson Marie Harf said, "We have reports of American citizens injured in the attack, and the U.S. Embassy is actively reaching out to provide assistance. Due to privacy considerations, we have no further comment on American citizens at this time."

Harf also said that the United States condemns the "senseless act of violence that has resulted in death and injury for many innocent men, women, and children."

In Kenya, officials are reiterating the urgent calls for blood donations that they have made all day. The number of wounded exceeds 100 people, according to reports.

The country's National Disaster Operation Centre says it confirms 31 people have died in the attack. The agency says that bodies are "in the lobby area and ground floor to be removed."

Update at 2:55 p.m. ET: Al-Shabab Applauds Attack; Gunman Detained

The Somali militant group al-Shabab says it supports Saturday's attack, but despite reports that the group had a role in planning the deadly assault, it may not be responsible. The group does acknowledge that it has been in touch with the gunmen in the building. We have revised this section of our post to clarify where things stand.

This afternoon, Al Jazeera reported that it had confirmation from the group that it was responsible for the attack; other news outlets made similar reports, which we noted in this space. But the official al-Shabab Twitter feed stops short of claiming a role in the violence.

The group calls the attack "retributive justice" in one tweet, in an apparent reference to Kenya's military presence in Somalia. Another described "the message we are sending to the Kenyan" people.

Authorities in Nairobi say they are in control of the situation, and have made at least one arrest.

"We have detained the Westgate Mall attack suspect in hospital," the Twitter feed of the Kenya Police announced Saturday.

And the head of Kenya's police, David Kimaiyo, refuted earlier reports made on social media and elsewhere that a suspect may have slipped through the security around the mall, after changing clothes.

"No suspect has escaped," he said. "I warn the public and media to stop making or airing false statement. The security is very tight."

Update at 12:25 p.m. ET: Govt. In Control, Official Says

"The government is now fully in charge of the situation" at Westgate Mall, Interior Permanent Secretary Mutea Iringo said at a news conference held early Saturday evening in Nairobi. He said that more people are being evacuated from the mall — but he added that the situation is not yet over — and that police and military troops are still "searching for criminals."

"We call for calm upon all Kenyans and wish to reassure the country that we're taking every measure possible to contain the situation," Iringo said.

Iringo said that an investigation is already under way, noting that the area in and around the mall is covered by many surveillance cameras. And he said that security has been increased at malls in Nairobi and other Kenyan cities.

Update at 11:50 a.m. ET: Hundreds Still Trapped Inside

"What appears to witnesses to be at least a dozen gunmen have taken hostages," NPR's Gregory Warner reports from outside the mall in Nairobi. "In the parking lot of the mall, family members are waiting for news of loved ones."

Gregory says that hundreds of people remain trapped inside Westgate Mall. As he reported from the scene, more bursts of gunfire could be heard from nearby.

Update at 10:46 a.m. ET: Tear Gas Fired Outside Mall

Government troops and police have fired tear gas in the area outside the mall, in a move to disperse the large crowds of people and members of the media who had gathered there.

Live footage showed several reporters on the scene doing their best to speak about what was happening — although at least one, a reporter for Kenya's KTN TV, declared that he could no longer open his eyes. The coverage soon shifted to a report from a hospital.

Update at 10:38 a.m. ET: Military Troops Join Police At Mall

Heavily armed members of the Kenya Defense Forces have now joined the police in taking up positions in and around the mall, where moments ago, more people were brought out of the facility. Officials on the scene and on Twitter are telling crowds that have gathered in the area to leave for their own safety.

Update at 10:20 a.m. ET: At Least 20 Killed, 50 Injured, Red Cross Says

The Kenyan Red Cross has updated its account of the attack, saying that at least 20 people have died and another 50 were wounded in the attack on Westgate mall.

Those figures have been reported by Kenyan media; CNN attributes them to Abbas Gullet, head of the Kenyan Red Cross. Government representatives have not yet provided an official account of the incident.

Update at 10:05 a.m. ET: Non-Muslims Reportedly Targeted

The AP has gathered accounts from witnesses, one of whom says the attackers told Muslims that they would come to no harm.

"The gunmen told Muslims to stand up and leave. They were safe, and non-Muslims would be targeted," mall visitor Elijah Kamau tells the news service.

Another witness, Manish Turohit, 18, tells the AP the gunmen were armed with AK-47s and wore vests with hand grenades on them.

"They just came in and threw a grenade. We were running and they opened fire," he says. "They were shouting and firing."

Turohit escaped serious harm after hiding in a parking deck, the AP says.

More hostages have been released in the past 30 minutes — and the authorities say they're interviewing those people to be sure they hadn't played a role in the attack.

"We are not taking chances and rescued hostages are screened," Police Inspector General David Kimaiyo said in a tweet sent earlier Saturday.

When the incident first began, police and witness reports suggested it may have been an attack on a store, or a bank. But Nairobi police chief Benson Kibue has since said the attack is being treated as a terrorist attack.

Update at 8:50 a.m. ET: Red Cross Says At Least 15 Killed, 'Scores Injured'

Kenya's Red Cross says "at least 15 killed" in the attack, Reuters reports.

On its Twitter feed, the Kenya Red Cross says that most hospitals in the area are full. An earlier update said, "Scores injured in the #Westgate Shootout."

Update at 8:28 a.m. ET: Many Hostages Emerge

Moments ago, live coverage on Kenya's Citizen TV news showed a large group of people, including children, walking quickly from the mall, escorted by security personnel. Many were immediately reunited with friends and family members who had been waiting outside.

Citizen TV reports that the gunmen had taken control of the upper floors and rooftop of the mall.

"We've managed to evacuate a number of people," Kenya's Interior Ministry tweeted.

But it seems the situation is not yet over. Officials have repeatedly urged Kenyans to donate blood to help the wounded.

Our original post continues:

Reports from the scene describe dozens of people streaming out of the multi-level Westgate Mall, in an affluent area on Nairobi's north side. Photos showed others receiving treatment for wounds on the sidewalk, and security personnel in green fatigues and helmets taking up positions outside the mall.

Police tell Kenya's Daily Nation that officers have evacuated parts of the area and are trying to learn more about the attackers.

"We have dispatched air surveillance and we confirm that they are armed criminals. We want to know who they are," said Internal Security Principal Secretary Mutea Iringo.

Kenya's Inspector General of Police National Police Service David Kimaiyo has been providing updates on Twitter about the incident. He warned the public and the media to stay away from the area.

Copyright 2016 NPR. To see more, visit http://www.npr.org/.