Since the deadly Madrid bombings more than a decade ago, the spectre of international terrorism has been at the forefront of Spain’s security efforts.

Some 191 people died when four commuter trains were bombed in March 2004. It remains the most deadly terror attack on European soil in the 21st Century.

Thursday’s attack, in which at least 13 people were killed after a van tore down the popular pedestrianised Las Ramblas strip in Barcelona, follows the pattern of recent vehicle-led attacks in Nice, Berlin and London.

Following the Madrid bombings, a national counter-terror crackdown was launched, preventing scores of attacks over the next 13 years.

Spanish authorities have reported arresting nearly 200 jihadis, with the only deadly attacks in the past decade being claimed by the Basque separatist group ETA.

More than a thousand people are on the radar of police, Spanish paper El Pais said in June, while 259 people are being investigated by the courts and 500 telephones are being tapped as part of dozens of investigations.

The newspaper said more than 3,000 officers from the security forces, spies, prosecutors, judges and analysts were working behind the scene with the country on high alert.

Police patrol the scene of the terrorist attack in Barcelona with the damage to the van clear to see
Police patrol the scene of the terrorist attack in Barcelona with the damage to the van clear to see (Manu Fernandez)

Last year, 10 separate terror plots were foiled in the country, Europol said.

Attacks by ETA, however, were numerous in the years following the 2004 bombings, with several lives lost between 2005 and 2011.

These include a van bombing at Madrid international airport in December 2006, which killed two Ecuadorean immigrants and injured 26, and a car bombing near a police barracks in Majorca in July 2009, which left two officers dead.

In April last year, ETA declared a “unilateral disarmament” and claimed to have handed in their weapons.

The injured are treated by medics at the scene of the terror attack in Barcelona
The injured are treated by medics at the scene of the terror attack in Barcelona (Oriol Duran/AP)

Foreign Office travel advice warns tourists that “terrorists are likely to try to carry out attacks in Spain”.

It reads: “Spanish police have disrupted a number of groups suspected of recruiting individuals to travel to Syria and Iraq from 2015 to the present date. Some of them expressed an intention to carry out attacks in Europe.

“Attacks could be indiscriminate, including in places visited by foreigners. The Spanish authorities take measures to protect visitors, but you should be vigilant and follow the instructions of the local authorities.”