Tunisia’s prime minister has said 21 people are dead after an attack on a major museum, including 17 foreign tourists - and that two or perhaps three of the attackers remain at large.

Habib Essid told national television the foreigners included five tourists from Japan, along with others from Poland, Italy, Germany and Spain.

Two French citizens were killed in the attack, according to a French diplomatic source.

Mr Essid said two of the attackers were killed in a gunfight with police, and that security forces are hunting for two or three others believed to have been involved.

The attack at the National Bardo Museum in Tunis was the worst in years on a tourist site in Tunisia, which is struggling to solidify its young democracy and prevent violence by Islamic extremists.

Female cleaner

A Tunisian security officer and a female cleaner were also killed, an interior ministry spokesman said.

Minister for Foreign Affairs Charlie Flanagan condemned the attack, adding there were no reports so far of Irish casualities.

In a statement he said: “I condemn the vicious mass killing which took place earlier today in Tunis, targeting Tunisians and tourists alike.”

He said he wanted to express “deep sympathies to the government and people of Tunisia at this terrible time, and to urge all Tunisians to continue working together to reject extremism”.

A spokeswoman for the Irish Department of Foreign Affairs said it was monitoring the situation via its Embassy in Madrid and the Honorary Consul in Tunis.

US secretary of state John Kerry in a statement said the US condemns the attack.

“The United States stands with the Tunisian people at this difficult time and continues to support the Tunisian government’s efforts to advance a secure, prosperous, and democratic Tunisia,” he said.

European Union foreign policy chief Federica Mogherini blamed “terrorist organisations” for the attack.

The EU corrected an earlier statement, removing a reference to Daesh, the Arabic acronym for Islamic State.

“With the attack that has struck Tunis today, the terrorist organisations are once again targeting the countries and peoples of the Mediterranean region,” Ms Mogherini said in a statement.

“This strengthens our determination to co-operate more closely with our partners to confront the terrorist threat,” she said.

“The EU is determined to mobilise all the tools it has to fully support Tunisia in the fight against terrorism and reforming the security sector.”

The Tunisian interior ministry spokesman earlier said a security operation was still ongoing at the Bardo museum.

Foreign tourists ran for shelter after the attack, covered by security forces aiming rifles into the air, live television footage showed.

Popular site

Security forces had surrounded at least two militants in the Bardo museum, a venue in central Tunis on the parliament grounds that is a popular site for visiting foreigners, the interior ministry spokesman said.

French prime minister Manuel Valls said on Wednesday France was standing by the Tunisian government in the aftermath of the attack.

“We are condemning this terrorist attack in the strongest terms,” Mr Valls said, speaking after a meeting with European Commission president Jean-Claude Juncker in Brussels.

“We are standing by the Tunisian government. We are very alert about how the situation is evolving,” he added.

A UK Foreign Office spokesman said: “We are urgently looking into the serious situation in Tunisia.”

Militant groups

Several militant groups have emerged in Tunisia, including Ansar al Sharia, which is listed as a terrorist organisation by the US.

Authorities estimate 3,000 Tunisians have also joined militant groups in Iraq and Syria and some have returned home, increasing government fears of potential attacks on Tunisian soil.

Islamic State affiliates in Libya are gaining a foothold as two rival governments there battle for control.

A senior Tunisian militant was killed while fighting for Islamic State in the Libyan city of Sirte over the past week, authorities said

Agencies