A man of Algerian origin has been shot dead by a police officer after he wielded a knife at a police station in Barcelona.
The man, locally named as Abdelouahab Taib, was "intending to attack the officers," according to a tweet by Spanish police.
The incident came just a few days after the first anniversary of the attacks in Barcelona and Cambrils by so-called Islamic State.
They left sixteen people dead and more than one hundred and fifty injured.
The attack occurred just before 6 a.m. on Monday in the Cornella district on the outskirts of the city.
The man was reported to have lived just one hundred and fifty metres away from the police station and had no criminal record.
He'd been living in Spain for a few years and had a foreign identity number.
Police station across Spain have been put on alert and Spain remains on its second highest terror alert level, four out of five, which it has been on since 2015.