Tunisian Prime Minister Habib Essid has named two suspects in the Tunis Bardo museum massacre that left 19 people dead, most of them foreign tourists, saying one of attackers was known to security services.

Essid said that security services flagged up one of the attackers, Yassine Labidi, but not for "anything special". The other gunman was named as Saber Khachnaoui. The Prime Minister said he was not aware of any links to militant groups such as the Islamic State (Isis). Authorities are investigating the backgrounds and motives of the two gunmen in coordination with other governments.

Abidi is a native of Ibn Khaldun, a popular district of Tunis, while the second is from Kasserine, which lies at the foot of Mount Chaambi near the Algerian border. The area is known to be the main hotbed of militant activity in the country.

Known to security forces

Both gunmen were killed by security forces in the attack. An interior ministry spokesman told AFP that two or three accomplices are still at large.

Essid explained the attackers opened fire on tourists as they descended from their bus and were then chased into the museum.

The tourists killed include citizens from Japan, Italy, Colombia, Australia, France, Poland and Spain. Two Tunisians, a police officer and a cleaner, were also killed in the shooting.

A pro-Islamic State outlet, the Ifrikiya media, has released a statement describing and praising the attack. It also posted pictures allegedly depicting the two dead gunmen after they were gunned down by security forces. The statement does not specify which group is responsible for the attack.

IS official daily bulletin also commended the Bardo shooting but did not claim responsibility for it.

Tunisia President: Attackers were from Ansar Al-Sharia

The president Beji Caid Essebsi blamed the attack on armed Islamists.

"Two have already been identified. We know that it is the extremists always called Ansar Al-Sharia called Salafi jihadists," he said on France 24.

A first evaluation reported Wednesday seventeen tourists and two Tunisians died in the attack, which lasted about four hours and has not yet been claimed.

Interviewed on BFM-TV, the Tunisian diplomatic chief, Taieb Baccouche, said Thursday morning that a person had died of his wounds, bringing the total number to 20 victims.

Growing menace

In recent months, political and security analysts have been warning against the domestic menace posed by jihadis who are already in the territory, such as radical Salafist group Ansar al-Sharia and its member group Uqba Bin Nafe, which operates in the Chaambi Mountains, and Tunisian returnees coming back from Syria and Iraq "by far the biggest contingent".

Indeed, Tunisia has been a major source of Islamist fighters travelling to Syria since 2011; of the estimated 5,000 currently operating in the region, a few hundreds have returned home.

The country also faces the menace posed by weapons smuggling through official border-crossing points between Tunisia and Libya, which remains the largest haven for terrorist groups affiliated with Islamic State (Isis) and is the main reservoir for all kinds of groups fighting in Syria.

Isis or al-Qaeda? Who supports who in Tunisia

- A number of Tunisian Salafist Jihadist groups want to establish an Islamic emirate in Tunisia

- They have pledged allegiance to either the Jabhat an-Nuṣrah li-Ahli ash-Shām (Islamic Movement of the Free Men of the Levant, or al-Qaeda in Syria) or ad-Dawlat al-Islāmiyah fī al-ʿIrāq wa sh-Shām (known as the Islamic State of Iraq and al-Sham, or IS)

- Tunisia's jihadist group Ansar al-Sharia (Partisans of Islamic law), one of the most radical Salafi movements, has not yet officially picked a side between IS and al-Qaeda after the split between the two super groups

- The group used to define itself as an al-Qaeda affiliation in Tunisia until 2013, but then declared allegiance to the IS Caliph, Abu Bakr al-Baghdadi

- While some of Ansar al-Sharia's youth have been lured by the IS PR-apparatus, according to security researcher Habib M Sayah, the group's leader Abu Ayadh al-Tunisi (also known as Saifallah Ben Hassine) has a close relationship with influential jihadi clerics who support al-Qaeda and reject IS

- Meanwhile, the Uqba bin Nafe Battalion is Ansar al-Sharia's three-year-old armed wing

- Uqba bin Nafe declared allegiance to IS in September 2014

- Tunisia's Interior Minister Lotfi Ben Jeddou said in June 2014 that of the nearly 2,400 Tunisian jihadists fighting alongside Syrian rebels (this figure has since been revised upwards), 80% of them were members of IS