The Catalan Mossos force said a man was killed at a police station. The incident took place just after Barcelona had marked the first anniversary of the terrorist attack in Las Ramblas boulevard.
A man wielding a knife tried to enter a police station in Barcelona and was shot down by an officer on Monday morning. Catalan regional police said the assailant had shouted "allahu akbar" as he attempted to enter the station. Investigators are treating the incident as a "terrorist attack."
The attack occurred in Cornella de Llobregat, a neighborhood in the western part of Barcelona. The regional Mossos, Catalonia's police force, said on Twitter that the man had arrived at 6 a.m. local time (0400 UTC/GMT) "with the aim of attacking the officers."
Catalan police chief Rafel Comas told a news conference that the assailant arrived at the station and said he wanted to make "a general inquiry." Once he was let in, the attacker leaped towards a police officer, brandishing a large knife. In order to repel the assailant's violent advance, the officer shot him. The suspect died at the scene.
"However you look at it, it was a knife attack against an officer (by a man who) shouted "Allah is great" and other things that were impossible to make out," Comas said.
"For now, we are treating it as a terrorist attack," he added.
According to local media, the attacker was a 29-year-old man of Algerian descent, who had legal residency in Spain and lived in the neighborhood of Cornella de Llobregat. The Mossos confirmed that he did not have any previous criminal record and as part of the investigation, his residency had been searched.
The incident comes on the heels of the first anniversary of a terrorist attack in Barcelona where 16 people died and 100 others were injured. The assault was carried out by young Islamic extremists, who drove a van down the city's busy central boulevard of Las Ramblas. It was Spain's worst terrorist attack since the Madrid train station bombing of 2004.