According to local media reports three men dressed in military-style clothing armed with kalashnikovs opened fire at around midday local time.
"A terrorist attack [targeted] the Bardo Museum," Tunisian interior ministry spokesman Mohamed Ali Aroui told journalists.
He said that the attack involved "two or more terrorists armed with Kalashnikovs".
The latest reports say that police had killed the two terrorist attackers after a stand-off. Several tourists who had been taken hostage were freed.
The Tunisian PM says says at least 17 foreign tourists were killed in the attack. A Tunisian policeman is also believed to have been killed.
Numerous other tourists were injured including four French nationals who were taken to hospital.
In a brief call with his Tunisian counterpart Beji Caid Essebsi, French president François Hollande expressed "the solidarity of France with … the Tunisian people in this very grave moment," a source close to Hollande's office told AFP.
French PM Manuel Valls said: "I condemn this terrorist attack in the strongest terms."
Earlier, a French national who was trapped in the museum at the time told BFM TV that she was with 40 French nationals who had locked themselves inside a room.
“Given the number of shots fired it would be a surprise if there are no deaths,” whispered the witness named Fabienne. “We are scared that they [gunmen] will arrive at any moment and shoot us.”
“I am sitting against the wall with my partner, another couple and a child.”
Around 200 visitors were said to be in the museum at the time of the attack.
(The map above shows the museum, with Parliament attached from the lower right.)
The Bardo museum is visited by thousands of tourists each year as it contains one of the world’s largest collections of Roman mosaics.
Images sent out on Twitter showed visitors to the museum including a number of children huddled together against the wall.
— reported.ly (@reportedly) March 18, 2015