At least 19 people were killed, including 17 foreign tourists, when militants attacked Tunisia's Bardo museum in the capital Tunis, Prime Minister Habib Essid said on Wednesday.
A Tunisian citizen and a policeman also died in the attack, Essid said.
Security forces were surrounding at least two militants in the Bardo museum in central Tunis, a venue that is often packed with foreigners, the interior ministry spokesman added.
Exchanges of gunfire first rang out from parliament around midday, TAP state news agency reported, and witnesses said large bodies of police moved in to try and evacuate the area.
Tunisia, whose 2011 uprising against autocrat Zine El-Abidine Ben Ali inspired "Arab Spring" revolts in Egypt, Syria and Libya, has up to now largely avoided the chaos and violence that has plagued those countries.
Several thousand Tunisians have also left the country to fight for militant groups in Syria, Iraq and Libya, and the government is worried about returning jihadis carrying out attacks at home.