Spanish cops shot dead a knife-wielding Algerian man who tried to attack them early Monday at a police station near Barcelona while yelling, "Allahu akbar!".
"A man armed with a knife entered the police station in Cornella to attack the officers".
The commissioner would not confirm the attacker was Algerian, saying police still needed to confirm that the Algerian identity papers he carried with him were in fact his.
The attacker, identified only as living in Cornella, was shot dead.
This is a developing story.
They did not say whether the attacker was killed, but a short time after the incident a wrapped-up body was taken out of the police station on a stretcher and placed in a mortuary van.
Spanish police are investigating a "terrorist attack" in Catalonia just days after the one-year anniversary of two assaults in the country's northeastern region that killed 16 people.
Catalan police are due to give more details about the attack at a Barcelona press conference scheduled for noon (20:00 AEST).
Officers searched the man's home, which was located just a few hundred metres (yards) from the site of the attack.
But he added that police have found no evidence linking the incident to terror attacks nearly exactly a year ago in Barcelona and nearby Cambrils, which killed 16 people.
The incident comes days after commemorations were held in Barcelona following the first anniversary of the Las Ramblas terror attack on August 17 a year ago.
Last year's attack was the worst on Spanish soil since train bombings in the capital Madrid in 2004 killed 191 people and wounded more than 1,800 others.
Catalonia, which is home to a significant number of second-generation North African immigrants, has had a long history of Islamic militant activity.
The nature of his injuries after being shot by the police are not yet known.