In the years after the Madrid attack, 90% of all jihadists convicted in Spain were foreigners, mainly from Morocco, Pakistan and Algeria, while 7 out of 10 resided in the metropolitan areas of Madrid or Barcelona.