Kenyan security forces swept into an upscale shopping mall late Sunday to try to end a two-day standoff with heavily armed Islamist militants after a gruesome attack that reflected the surprising resiliency of one of Africa’s most brutal insurgent groups.

Authorities later said that most hostages had been freed, but they provided few details. It appeared that at least some members of Somalia’s al-Shabab militia, which asserted responsibility for the attack, were still holed up early Monday in the Westgate Premier Shopping Mall, where they killed 69 people in the deadliest terrorist attack in Kenya in 15 years.

“Most of the hostages have been released, and the Kenya Defense Forces has taken control of most parts of the building,” a Kenyan military spokesman, Col. Cyrus Oguna, told the television station KTN. He did not say how many hostages had been held or freed.

On Monday morning, explosions and gunshots were heard from the besieged mall and there were reports of clashes unfolding inside the building. Meanwhile, a spokesman for Al Shabab reportedly threatened to kill hostages if Kenyan security forces, who are being advised by western and Israeli experts, stormed the mall.

“Israelis and Kenyan forces have tried to enter Westgate by force but they could not,” Sheikh Ali Mohamud Rage said in an audio statement posted online, according to Reuters. “The mujahideen will kill the hostages if the enemies use force.”

Sixty-three people remain missing, according to the Kenyan Red Cross, but it is unclear if they are being held hostage or if they are hiding from the attackers. Also unclear were the fates of the 10 to 15 assailants who are heavily armed.

In a nationally televised news conference, Kenyan President Uhuru Kenyatta declared that the siege would probably end soon. “The criminals are now located in one place within the building. With the professionals on site, I assure Kenyans that we have as good a chance to successfully neutralize the terrorists as we can hope for,” he said. Kenyatta added that one of his nephews and the man’s fiancee were among those killed.

The attack stunned Kenya, which has one of the continent’s biggest economies and has been a major hub for U.S. military and humanitarian activity in East Africa.

For the past two years, al-Shabab, which is linked to al-Qaeda, has been considered by many U.S. officials and analysts to be all but defeated. The militia had lost much of the territory it once held in Somalia, including the capital, Mogadishu. It was pushed to the margins by a campaign that has involved U.S. Special Operations troops as well as African forces mobilized largely by Kenya, Uganda, Ethiopia and Burundi.

But the well-organized assault on the mall that began around lunchtime Saturday upended the calculations of Kenyan and Western security officials. As of early Monday, the toll had risen to 68 dead and more than 175 injured, the Kenyan Red Cross said. The attackers, who carried grenades and clutched machine guns and AK-47 assault rifles, had chosen a target popular with Westerners and wealthy Kenyans, a move sure to hurt the nation’s critical tourism industry and spread unease among the numerous Western aid agencies based in Nairobi.

“This tells me that al-Shabab remains resilient, able and willing to strike beyond Somalia’s borders to survive,” said Juan Zarate, who served as a senior counterterrorism adviser in the administration of President George W. Bush. “They remain a real terrorist threat to Somalia, the region and potentially beyond.” The dead included numerous foreigners from Britain, France, Canada, Australia and other countries. While no Americans were reported killed, Ruhila Adatia-Sood, the wife of Ketan Sood, a Foreign Service national working for the U.S. Agency for International Development in Nairobi, was among the dead, USAID said in a statement. Five American citizens were wounded, U.S. officials said.

In numerous tweets from a Twitter handle that was later disabled, al-Shabab declared that the attack was in revenge for Kenya sending troops to fight in neighboring Somalia and said that the group was shifting the battleground to Kenya.

At Nairobi’s Aga Khan University Hospital on Sunday, survivors spoke about how they escaped death in the mall. One British man said his wife and children were hiding behind a meat counter in a store with other women and children. The gunmen sprayed bullets at them, killing a woman and a teenage girl, and wounding his wife, said the man, who asked that neither his nor his spouse’s name be used because they feared retribution. His wife lay in a hospital bed and declined to speak.

The gunmen, the man said, released the children who were still alive and informed his injured wife that she, too, could leave if she converted to Islam, making her recite the Shahada, Islam’s basic profession of belief.

Then the gunmen handed chocolates to the children as they left the mall, the man said.

In a nearby bed, Aquilah Kauser Ishaq, 32, a marketing manager for a local radio station, was nursing wounds from a grenade attack. She was on the top floor when she and her friends heard explosions. Outside in the parking lot, kids were taking part in a cooking class when the gunmen began firing randomly in their direction. “They actually targeted the kids,” Ishaq said. “There was a brother and sister running away. They were shot dead in front of us.”

Then a grenade landed by her foot. A friend pushed her out of the way but the shrapnel struck her legs and back. The grenade struck a boy and she watched him die, she said. “I even wonder how I am here now,” she said.

The assault was the deadliest in Kenya since al-Qaeda operatives masterminded the twin bombings of the U.S. embassies in Nairobi and Dar es Salaam, Tanzania, in 1998.

Al-Shabab also staged the twin bombings in Kampala, Uganda, during the soccer World Cup in July 2010, killing more than 70 people. That attack, the militia said, was in retaliation for Uganda sending its troops to Somalia to support its Western-backed government.

But since mid-2011, al-Shabab has been on its heels, after an offensive by African Union forces backed by the United States and other Western governments. While it remains in control of large swaths of southern Somalia’s countryside, the militia has been riven by a struggle within its core leadership.

In Kenya, the militia has staged small attacks on local targets such as bus stations and churches, killing a handful of people, since the government sent troops to Somalia in October 2011.

But Saturday’s attack suggested far greater operational planning and tactical sophistication, analysts said.

“The attack is more likely to be a first salvo of a reinvigorated al-Shabab than the last gasp of a defeated organization,” said J. Peter Pham, head of the Africa Center at the Atlantic Council. “While there have been divisions within and defections from al-Shabab, my sense is that the hard-core element will actually emerge more nimble and lethal as a result of shedding those elements.”

The attack on the mall, he said, would have required a local unit to conduct reconnaissance and plan other details, suggesting that the militia has an “extensive support network” in Kenya.

Targeting the mall, Pham said, sends a “much clearer signal of the group’s resurgence, both to al-Qaeda central and other regional affiliates and to audiences from which it will now, undoubtedly, try to recruit.”

Abdi Aynte, a Somali analyst, said al-Shabab wants to “shift the front lines of the war from inside Somalia to the heart of Kenya” and trigger a public debate about the “viability” of Kenya’s intervention in Somalia.

Not all terrorism experts agreed that the attack showed al-Shabab’s strength. Juan Cole, a professor at the University of Michigan, wrote in a blog that the attack was “the act of a declining political movement that has lost enormous ground in recent years” and is “on its way to oblivion.”

Bruce Hoffman, a counterterrorism expert at Georgetown University, said a reemergence of al-Shabab could place new strain on U.S. intelligence and counterterrorism agencies, which have shifted resources to places such as Syria, Egypt and Mali.

“Renewed al-Qaeda-generated instability in East Africa is the last thing we need right now,” Hoffman said. “We can keep hoping that the war on terrorism and the struggle against al-Qaeda is over, but it isn’t. It’s the monster that keeps rising from the grave.”

Miller reported from Washington. Craig Whitlock, Anne Gearan, Ernesto Londoño and Julie Tate in Washington contributed to this report.