The two Algerians were preparing a terror attack, Spanish radio station Cadena Ser reported, quoting unidentified sources close to the investigation. Regional police declined to comment on this.
In May, police had arrested a Moroccan man in Barcelona with suspected links to Islamic State who they believed was planning a militant attack.
A total of 16 suspected jihadist fighters have been arrested in Spain from the start of the year til July 5th, according to data from the interior ministry. Islamist militants used a van to hit pedestrians in Barcelona's Las Ramblas boulevard in August 2017 and carried out a follow-up attack in another Catalan municipality, killing 16 people in total.