TUNIS - Tunisia said it would deploy the army to major cities and arrested nine people on Thursday after 20 foreign tourists were shot dead in an attack on a museum which Islamic State militants called "the first drop of the rain".
Japanese, Italian, Spanish and British visitors, as well as three Tunisians, were among the victims of the attack, which took place in the heavily guarded parliament compound of a country largely spared the violent aftermath of the Arab Spring.
Officials did not confirm the militants' claim of responsibility, but said they had identified two gunmen shot dead by security forces after the shootings, which targeted tourist buses visiting the Bardo museum on Wednesday.
The two gunmen were trained at a jihadist camp in Libya, the Tunisian government said. Interior ministry official Rafik Chelli said the two men had been recruited at mosques in Tunisia and travelled to Libya in September.
Cruise liner MSC Cruises said 12 of its passengers, including Colombians, French and a Belgian, were among the dead, while a Spanish couple was found alive on Thursday after hiding all night in the museum.
The assault - the most deadly attack involving foreigners in Tunisia since a 2002 suicide bombing in Djerba -- came at a fragile moment for a country just emerging to full democracy after its pioneering popular uprising four years ago.
It is heavily reliant on foreign tourists to its beach resorts and desert treks, and the government was about to tackle politically sensitive reforms aimed at boosting economic growth.
Islamic State, which has declared a caliphate in large parts of Iraq and Syria and is active in Tunisia's chaotic neighbour Libya, praised the two attackers in an audio recording as "knights of the Islamic State" armed with machineguns and bombs.
Tunisians make up the one of the largest contingents of foreign fighters in Syria, Iraq and Libya, and their homeland's young democracy, which has cracked down on militancy at home, was a clear potential target.
"We tell the apostates who sit on the chest of Muslim Tunisia: Wait for the glad tidings of what will harm you, o impure ones, for what you have seen today is the first drop of the rain," the Islamic State audio said in Arabic.
The two dead militants were identified as Tunisians, Hatem al-Khashnawi and Yassin al-Abidi. Two local newspapers reported Abidi had spent time in Iraq and Libya, but officials did not confirm that.
Tunisia's Prime Minister Habib Essid said Abidi had been under surveillance but "not for anything very special".
"We have identified them, it is indeed these two terrorists," the premier told French RTL radio earlier on Thursday. "Their affiliation is not clear at the moment."