A van has crashed into dozens of people in Barcelona's city center, local police said on Thursday. The incident has been classified a terror attack.

The city police have confirmed that a "massive crash" has happened in downtown Barcelona.

Several pedestrians have sustained injuries, according to the police.

Vanguardia newspaper reports that there were dozens of people in the area at the time.

Unsettling images and videos appeared on Twitter soon after the incident.

Barcelona police took to Twitter to warn people to stay away from the area around Placa Catalunya.

🚩Atropello múltiple en las #Ramblas. Se solicita a los ciudadanos no transitar por la zona de Plaza Catalunya. +info @emergenciescat — Policía Nacional (@policia) August 17, 2017

"There has just been a massive trampling on the Ramblas in Barcelona by a person with a van. There are injured," the Mossos d'Esquadra, Catalonia’s police force, said in a tweet.

Van rams into crowds in #Ramblas area in #Barcelona, several injured, Spanish police say pic.twitter.com/1DlfyN4ipX — Yotam Rozenwald (@Yotam_R82) August 17, 2017

Local media has reported that some 20 people could have been injured in the attack.

The driver has reportedly managed to flee the scene of the crime on foot. Shots have been heard in the area where the incident took place.

🔴 CRITICAL |



Police arrived to the location in #Barcelona where a truck rammed into crowd injured many… pic.twitter.com/JotoFRhUR3 — Vocal Europe (@thevocaleurope) August 17, 2017

Although the authorities were initially inclined to believe that the incident is related to drug trafficking, the police have declared the incident a terror attack.

According to preliminary reports, several people could have been killed in the attack.

Following calls from Catalan emergency services to close the public transportation stations in the area, all metro stations have been shut down.

Local media has reported that two armed men barricaded themselves in a restaurant following the attack. It remains unclear if this is related to the incident.