Jihadists warned "Christians" to avoid Tunisia for their summer holidays seven weeks before last weekend's attack, one of several warning signs of the group's threat that appear to have been missed.
A tweet in English by an Isis (Islamic State) social media account in early May said the group was planning an attack worse than that on the Bardo Museum two months before, which killed 19 tourists.
A prominent Tunisian figure in the group also said in the Isis magazine Dabiq that a colleague was running a training camp in Libya.
The Tunisian authorities confirmed yesterday Seifeddine Rezgui, the attacker who killed 39 people in El Kantaoui, crossed the border to train in Sabratha, in western Libya.
In May, the "Ajnad al-Khilafa" account sent out tweets saying: "To the Christians planning their summer vacations in Tunisia, we cant accept u in our land while your jets keep killing our Muslim Brothers in Iraq & Sham (sic). But if u insist on coming then beware because we are planning for u something that will make you forget #Bardoattack."