Tunisian security forces, meanwhile, arrested nine people Thursday, the president's office said, adding that five of them were directly connected to Wednesday's attack on the National Bardo Museum by two gunmen who were later slain by police. The other four suspects who were arrested in central Tunisia were part of a cell supporting those involved in the attack, the statement said.
Prime Minister Habib Essid told France's RTL radio that Tunisia was working with other countries to learn more about the slain attackers, identified as Yassine Laabidi and Hatem Khachnaoui. He said Laabidi had been flagged to the intelligence agency, although not for "anything special."
Wednesday's attack was the worst at a tourist site in Tunisia in more than a decade and prompted a leading Italian cruise ship line to announce it was canceling all stops in Tunisia indefinitely.
The deaths of tourists will create oceans of trouble for the country's tourism industry, which brings throngs of foreigners every year to Tunisia's Mediterranean beaches, desert oases and ancient Roman ruins — and which had just started to recover after years of slump. Two major cruise ships whose passengers had been among the victims left the port of Tunis early Thursday.
Razor wire ringed the museum entrance Thursday and security forces guarded major thoroughfares in Tunis, the capital.
The Islamic State group claimed responsibility for the attack in an audio and written statement on jihadi forums and described the museum housing Roman artifacts as a "den of infidels and vice" and celebrated the two attackers as "knights" armed with assault rifles and grenades.
The statement said the attack was just "the first drop of rain" and promised further strikes.
Tunisia has faced scattered extremist violence for the past few years, and a disproportionately large number of Tunisians have joined Islamic State fighters in Syria and Iraq.
According to survivors and witnesses, two or more gunmen attacked the museum wielding assault rifles and began gunning down tourists in front of a row of about 10 buses. The attackers then charged inside to take hostages before being killed in a firefight with security forces.
A Spanish man and a pregnant Spanish woman who survived hid in the museum all night in fear. Spain's foreign minister said police searched all night for the pair, Juan Carlos Sanchez and Cristina Rubio, who were retrieved safely Thursday morning by security forces.
The Health Ministry said the death toll rose Thursday to 23 people, including 20 foreign tourists, with almost 50 people wounded. Three Tunisians were killed, including two attackers. All the injuries came from bullet wounds and several victims were brought in without identification.
Dr. Samar Samoud of the health ministry said six of the dead remained unidentified. She listed the rest of the foreign victims as three Japanese women, three French citizens, a retired Spanish couple, an Australian man, a Colombian woman, a British woman, a Polish man, a Belgian woman and an Italian citizen.
The Spanish couple who died was celebrating their 50th wedding anniversary and it was the first time they had travelled outside Spain, the Spanish foreign minister said. Their two children were flying to Tunis along with a terror attack counselor to retrieve their parents' bodies.
One victim, identified in Japanese media as 66-year-old Machiyo Narusawa, was among a group of 70 Japanese tourists, mostly retirees who traveled from Tokyo.
A Tunisian translator for some Polish tourists, Abdelwaheb Khedimi, told TVN24 that he was standing across the street from the museum gate when he saw two men run through the gate, produce automatic weapons and start firing in the direction of 10 tour buses in the museum's parking lot.
"It was a total shock," Khedimi said.
A Polish military plane arrived in Tunis on Thursday morning to bring back Polish tourists who want to return home. Polish President Bronislaw Komorowski said some people from Poland were still missing and Polish prosecutors say they will open their own investigation.
The Costa Crociere cruise line announced Thursday it has decided to cancel all upcoming stops in Tunisian ports following the attack and will find alternate ports of call, which are still being defined.
"The security of our guests and crew is Costa Crociere's priority and a necessary condition for calm and pleasant vacations," the company said.
Tunisian legislator Bochra Belhaj Hmida, of the secular majority party Nida Tunis, told the AP that about 2,000 suspected terrorists are believed to be in Tunisia, many of whom joined extremists in Iraq or Syria then returned home.
"They are in a situation of being lone wolves, where each of them is free to do the actions they want," she said. "These are people who are let loose with weapons and wherever they can strike, they will not forgo the opportunity."
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 extremism, though violence had not previously targeted tourist sites.
"This new act of barbarity sounds an alarm," French Prime Minister Manuel Valls said. "It announces that the world has changed."
Associated Press reporters Maggie Michael in Cairo, Mari Yamaguchi in Tokyo, Nicole Winfield in Rome, Jeff Schaeffer in Tunis, Monika Scislowska in Warsaw, Harold Heckle in Madrid and Lori Hinnant in Paris contributed to this report.
Copyright 2015 The Associated Press. All rights reserved. This material may not be published, broadcast, rewritten or redistributed.