TUNIS, Tunisia - Foreign tourists scrambled in panic Wednesday after extremists stormed a museum in Tunisia's capital and killed 19 people, "shooting at anything that moved," a witness said.

Two gunmen were slain by security forces after the deadliest attack on civilians in the North African country in 13 years, and the president said the young democracy was embroiled in a war with terror.

The extremists, who wore military-style uniforms and wielded assault rifles, burst from a vehicle and began gunning down tourists climbing out of buses at the National Bardo Museum. The attackers then charged inside to take hostages before being killed in a firefight with security forces.

Authorities launched a manhunt for two or three accomplices. Prime Minister Habib Essid said the two Tunisian gunmen killed 17 tourists - including five from Japan, four from Italy, two from Colombia, two from Spain, and one each from Australia, Poland, and France. The nationality of one dead foreigner was not released. Essid said two Tunisian nationals also were killed by the extremists.

At least 44 people were wounded, including tourists from Italy, France, Japan, South Africa, Poland, Belgium, and Russia, according to Essid and doctors from Tunis' Charles Nicolle hospital.

Hours after the siege ended, thousands flocked to the landmark Avenue Bourguiba for a rally, chanting for a "Free Tunisia."

"I want the people of Tunisia to understand firstly and lastly that we are in a war with terror, and these savage minority groups will not frighten us," said newly elected President Beji Caid Essebsi in an evening address to the nation. "The fight against them will continue until they are exterminated."

Tunisians overthrew their dictator in 2011 and kicked off the Arab Spring that spread across the region. While the uprising built a new democracy, the country has also struggled with economic problems and attacks by extremists.

Essid identified the slain gunmen as Yassine Laabidi and Hatem Khachnaoui.

Twitter accounts associated with the extremist Islamic State based in Syria and Iraq were described as overjoyed at the attack, urging Tunisians to "follow their brothers," said Rita Katz of SITE, a U.S.-based organization that monitors extremists groups.

Essid said the attack was an unprecedented assault on the economy. It came as Tunisia's all-important tourism business was starting to rebuild after drastic losses following the postrevolutionary turmoil.

The assault at the Bardo, Tunisia's largest museum, housed in a 15th-century palace, began sometime after noon as scores of European tourists were visiting.

Josep Lluis Cusido, mayor of the Spanish town of Vallmoll, said he saw people gunned down on the plaza outside the museum before the gunmen moved inside.

"After they entered the museum, I saw their faces: They were about 10 meters away from me, shooting at anything that moved," he told Cadena Ser radio.

The museum, 21/2 miles from the city center, is near the parliament building, which was evacuated.

The Bardo houses one of the world's largest collections of Roman mosaics among its 8,000 works.

On Wednesday night, parliament held an extraordinary session in which Speaker Mohammed Ennaceur called for creation of a fund to combat terrorism. He also called for rapid passage of the antiterror law that parliament had been debating when the attack took place.

Tunisia has been hailed as a model of democratic transition as other governments that came to power after the Arab Spring collapsed. Islamists and secular forces have worked together - often reluctantly - to defuse the country's political crises in the years since the revolt.

Last fall, Tunisians elected a secular-minded president and a parliament dominated by liberal forces after souring on Islamist-led rule.

U.S. Secretary of State John Kerry praised Tunisia's "rapid response" to restore calm.

North Africa analyst Geoff Porter said an attack on a tourism site had long been expected as the extremists come under pressure from increasingly effective Tunisian security forces. "Today's attack did not come out of nowhere," he said. "In fact, it comes amid ongoing counterterrorism efforts elsewhere in the country."

The attack came a day after Tunisian security officials confirmed the death in neighboring Libya of Ahmed Rouissi, a leading suspect in the killings of two opposition figures in Tunisia.

He had become a field commander for the Islamic State in Libya and died fighting near the town of Sirte.

A disproportionately large number of Tunisian recruits - about 3,000, according to government estimates - have joined Islamic State fighters in Syria and Iraq and many have received training in Libya.

Previous Attacks In Tunisia

More stable than other countries in the region, Tunisia still has struggled with violence by Islamic extremists who have sworn allegiance to al-Qaeda and the Islamic State.

Wednesday's attack was the worst in the country since an al-Qaeda member detonated a truck bomb in front of a synagogue on the island of Djerba in 2002, killing 21, mostly Germans.

The U.S. Embassy was attacked in 2012, after the release of an online video on the prophet Muhammad, seriously damaging the embassy grounds and an adjoining American school. Four assailants were killed.

Overall, violence in Tunisia in recent years has been largely focused on security forces, with dozens killed by extremists.

The 2013 killing of two opposition leaders triggered the fall of Islamist-led governments.

In late 2013, a man blew himself up on a beach in the town of Sousse after being chased from a hotel. That led many to fear a new wave of attacks on tourism. None materialized until now. - AP EndText

This article contains information from the Washington Post.