The attack on the famed National Bardo Museum in Tunis was the first on a tourist site in years in Tunisia, a shaky young democracy that has struggled to keep Islamic extremist violence at bay.
It was not clear who the attackers were but security forces immediately flooded the area. Tunisia's parliament building, next to the museum, was evacuated.
Private television Wataniya showed masked Tunisian security forces escorting dozens of tourists up nearby steps and away from the danger, as armed security forces pointed guns toward an adjacent building.
Tunisian Prime Minister Habib Essid said 21 people were killed: 17 tourists, two gunmen, a Tunisian security officer and a Tunisian cleaning woman. He said the dead tourists came from Italy, Poland, Germany and Spain.
Also Read
He said two or three of the attackers remained at large.
Several other people were reported wounded in the attack, including three Poles and at least two Italians. The Italian Foreign Ministry said 100 other Italians had been taken to a secure location.
Some of the Italians at the museum were believed to have been passengers aboard the Costa Fascinosa, a cruise liner making a seven-day trip of the western Mediterranean that had docked in Tunis.
The cruise ship recalled all the passengers to the ship and was in touch with local authorities and the Italian Foreign Ministry.
Today's attack was a strong blow to Tunisia's efforts to revive its crucial tourism industry.
The National Bardo Museum, built in a 15th-century palace, is the largest museum in Tunisia and houses one of the world's largest collections of Roman mosaics among its 8,000 works.