Gunmen armed with assault rifles stormed a major museum in Tunisia's capital on Wednesday, killing at least 20 people, most of them European tourists, in a country widely viewed as one of North Africa's rare democratic success stories.
Security forces killed two gunmen and detained a third, but some of the assailants may have escaped before the three-hour standoff was brought to an end, Tunisian officials said.
It was unclear who was behind the attack. Tunisia is regarded as one of the region's more stable countries, but authorities have struggled to contain Islamist extremists who periodically attack the security forces.
As many as 3,000 Tunisian nationals may have joined Islamic State and other groups fighting in Syria and Iraq, according to government estimates. Militants affiliated with Al Qaeda's North Africa franchise are also believed to be active in the country, which shares a porous border with its volatile neighbor, Libya.
"What happened is a great calamity for Tunisia," President Beji Caid Essebsi said while visiting a hospital where some of those injured Wednesday were being treated. "Tunisia must enter a state of general mobilization to face this terror threat."
Tunisia is where the string of uprisings that became known as the "Arab Spring" began in 2011. In the four years since the overthrow of longtime strongman Zine el Abidine ben Ali, the country has agreed on a new constitution, staged peaceful parliamentary elections and seen a nonviolent transfer of power by Islamists who had moved to the political fore after the uprising. But regional experts warned that Wednesday's attack could undermine faith in the new government and lead to an aggressive crackdown.
"There's a worry that people will correlate democracy with deteriorating security," said Shadi Hamid, a Middle East scholar at the Brookings Institution in Washington. "That kind of sentiment can be dangerous for a young, fragile democracy."
The attack on the National Bardo Museum struck a blow at government attempts to revive the tourism industry, a key source of revenue and jobs in a country beset by poverty and high unemployment among young people.
On Wednesdays, cruise ships dock in Tunis and hundreds of tourists visit the Mediterranean capital. The museum, which is housed in a 15th century palace and features one of the world's largest collections of Roman mosaics, is among the country's main attractions.
Five tour buses were parked outside when the gunmen struck shortly after noon, said Mohammed Ali Aroui, an Interior Ministry spokesman.
The assailants opened fire on one bus, killing seven tourists and a Tunisian cleaning woman, he said. They then advanced on the adjacent national parliament, where lawmakers were reported to be discussing anti-terrorism legislation.
Security forces guarding the parliament fired at the attackers, who retreated into the museum and took 20 to 30 people hostage, officials and witnesses said.
Television video from the scene showed panicked visitors, many of them elderly, running from the museum. Security forces escorted dozens more to safety, officials said.
"I saw death with my own eyes," said Lamine Chtoui, a 16-year-old high school student who was waiting to catch a bus home when he heard the gunshots. "I wanted to check what happened when I saw police coming from everywhere, surrounding us and taking us away.... I was afraid that there were bombs or terrorists around. My mom was also scared; she took three hours to find me."
Ahmed Bouhrizi, a Tunisian tour guide, had just finished showing a group of Spanish-speaking visitors around the museum and was escorting them back to their bus when the gunfire erupted. The group ran for cover, he said. When the shooting stopped, he returned to check on those who had already boarded the bus and found a couple dead.
"After 24 years of working in tourism, this is the first time I see something like this. This is not Tunisia. Tunisia is a peaceful country," he lamented outside the compound that houses the museum and parliament. "This is a disaster that will touch [millions of] people who work in tourism."
Juan Jose Gonzalez, Mexico's ambassador to Algeria with responsibility for Tunisia, credited museum guards for protecting many of the trapped tourists, including eight Mexican nationals.
One of the Mexicans was able to get a phone call out to embassy staff and reported that guards had ushered them into interior rooms of the museum. From there, they were able to escape, Gonzalez said.
"They heard the gunfire even as they were moving farther inside," he told Mexican media.
The standoff ended with 21 people dead: 17 visitors from Italy, Poland, Germany and Spain, along with the two gunmen, the Tunisian cleaner and a member of the Tunisian security forces, Prime Minister Habib Essid said at a news conference.
Tunisian authorities later raised the death toll to 22 but did not provide the nationality of the latest victim.
At least 50 people were injured, according to health officials.
Tourist attractions and buses carrying foreigners have been a favored target of extremists in nearby Egypt since the 1990s. In 2012, about 2,000 Tunisians attacked the U.S. Embassy and an adjoining American school over a movie they believed insulted Islam, causing serious damage. But attacks aimed at foreigners are rare in Tunisia.
"It is not by chance that today's terrorism affects a country that represents hope for the Arab world. The hope for peace, the hope for stability, the hope for democracy," French Foreign Minister Laurent Fabius said in a statement from Paris. "This hope must live."
Supporters of Islamic State celebrated the attack on social media, calling it retribution for "killing the believers and torturing them in prisons," but there were no immediate claims of responsibility.
The Interior Ministry identified the slain gunmen as two Tunisian nationals, one of whom had been missing for four months. He last contacted his family using an Iraqi phone number, Aroui, the ministry spokesman, told journalists.
The previous day, Tunisian security officials had confirmed the death of a militant suspected in a series of attacks, including the assassinations of two leftist politicians in 2013. Ahmed Rouissi had become a field commander for Islamic State in Libya and died in fighting near the Libyan town of Surt, they said.
Religious leaders and human rights activists have accused Tunisian authorities of making sweeping arrests based on little more than a suspect's appearance as a devout Muslim. Hamza Labidi, a youth activist, said he saw police grab three men by their beards and drag them into a police van in the hours after Wednesday's attack.
"I was just walking by and the police arrested them for no reason," he said.
Karim Mezran, a senior scholar at the Atlantic Council, said the government might clamp down on perceived threats.
"If that happens, it is not good news for Tunisians, as it could derail the political transition in a country that has provided the only good news emerging from the Arab Spring," he said in emailed comments. "There is a danger Tunisia will revert to its old ways of security first."
Special correspondent Addala reported from Tunis and Times staff writer Zavis from Los Angeles. Staff writer Sarah Parvini in Los Angeles and special correspondent Amro Hassan in Berlin contributed to this report.