TUNIS, Tunisia -- Tunisia's prime minister has fired five leading security officials after three gunmen attacked a renowned Tunis museum, killing 21 in the deadliest attack on tourists in Tunisia in 13 years, the government said Monday.

The ousted officials include the director of Tunisia's tourist police and the police chiefs for the neighbourhood around the National Bardo Museum and for metropolitan Tunis, government spokesman Mufdi Mseddi told The Associated Press. All but one of those killed were foreign tourists.

Separately, a police officer charged with surveying the museum was jailed, said prosecutor's office spokesman Sofiane Selliti. He didn't give any more details.

The decision was made after a midnight visit by Prime Minister Habib Essid to the neighbourhood of the attack a few miles from central Tunis. He noted security problems, the spokesman said. President Beji Caid Essebsi had also criticized security failings around last week's attack. The gunmen opened fire on tourists getting out of buses and then entered the museum, apparently unimpeded, and fired on more tourists inside. Two gunmen were killed in a shootout with police.

The Interior Ministry has identified a man suspected of co-ordinating the attack and posted two photos of him on its Facebook page. One photo shows the man, identified as Maher Ben Mouldi Gayed, with short hair and wearing a T-shirt, while the other shows him sporting a beard and wearing a religious-style robe.

The Islamic State group claimed responsibility for attacking the leading Tunisian historical museum, which shows a trove of Roman mosaics.

Police identified the two dead attackers as Tunisians in their 20s who had trained in Libya. Several well-armed groups in neighbouring and chaotic Libya have pledged allegiance to IS.

Tunisia is also fighting extremists claiming allegiance to al-Qaida in its western mountains, near Algeria. A Tunisian defence official said Monday one soldier was killed and three others wounded when a mine blew up their vehicle in an area known to be a refuge for al-Qaida-linked Islamic radicals.

Lt. Col. Belhassen Oueslati, a Defence Ministry spokesman, said the incident occurred Sunday near the Algerian border. Al-Qaida-linked radicals have staged attacks against the army and politicians in the area for the past two years.

The Bardo museum plans to reopen to the public Tuesday, with a special ceremony including guest artists. Museum officials have said that no major archaeological treasures suffered damage and the museum needs only minimal repairs.

Tunisia also plans a national march against terrorism Sunday, and is inviting world leaders to join.