ES News email The latest headlines in your inbox twice a day Monday - Friday plus breaking news updates Enter your email address Continue Please enter an email address Email address is invalid Fill out this field Email address is invalid You already have an account. Please log in Register with your social account or click here to log in I would like to receive lunchtime headlines Monday - Friday plus breaking news alerts, by email Update newsletter preferences

A knifeman was shot dead by police after he attempted to stab officers in a suspected terrorist attack at a police station in Barcelona.

Officials said the suspect was shot dead after pulling a knife out at the station in the ​Cornella district on the outskirts of the city.

Commissioner Rafel Comes, the second-in-command of the Barcelona police, told a news conference that the man shouted "Allah" and other words that police officers did not understand.

He added that the man pressed the buzzer to be let in and spoke with officers. As soon as they decided to let him in, he pulled out a "large knife" and lunged at officers.

Mr Comes said that the man, said to be 29 and of Algerian origin, "intended to attack police officers."

He added that police have found no evidence linking the incident to last year's terror attacks in Barcelona and nearby Cambrils, which killed 16 people.

Intelligence services are helping with the investigation.

According to Spanish news agency Efe, the man ran through the building's entrance at about 6am and was shot dead when he rushed forward.

Images posted online showed police searching the man's residence.

The man had ID on him and police are checking to see whether they are authentic.

According to El Pais, he lived 150 metres from the police station.

All other regional police stations and security forces throughout Spain have been alerted about the incident.

It comes just days after Spain marked a year since the two terror attacks.