Police said several people were injured and described the incident on Twitter as a “massive crash”. A police spokesman said he could not confirm any deaths or that the incident was being treated as terrorism.
Soon afterwards, Spain’s El Periodico newspaper reported that two armed men were holed up in a bar in Barcelona’s city center, and reported gunfire in the area, although it did not cite the source of the information.
It was not immediately clear whether the incidents were connected.
Following the van crash, emergency services said people should not go to the area around Barcelona’s Placa Catalunya, one of the city’s main squares at the top of the famous Las Ramblas avenue, and requested the closure of nearby train and metro stations.
El Pais newspaper said the driver of the vehicle had fled on foot after mowing down dozens of people.
Prime Minister Mariano Rajoy said he was in contact with authorities, and the priority was to attend to the injured.
The incident took place at the height of the tourist season in Barcelona, which is one of Europe’s top travel destinations with at least 11 million visitors a year.
While full details of the van incident were not immediately clear, vehicles have been used to ram into crowds in a series of militant attacks across Europe since July 2016, killing well over 100 people in Nice, Berlin, London and Stockholm.
Witness Ethan Spibey told Britain’s Sky News: “All of sudden it was real chaos. People just started running screaming, there were loud bangs. People just started running into shops, there was a kind of mini-stampede where we were, down one of the alleyways.”
He said he had taken refuge with dozens of other people in a nearby church.
“They’ve locked the doors because I’m not sure whether the person who may have done it has actually been caught, so they’ve locked the doors and told people just to wait in here.”
In recent weeks, threatening graffiti against tourists has appeared in Barcelona. In one video released under the slogan “tourism kills neighborhoods”, several hooded individuals stopped a tourist bus in Barcelona, slashed the tyres and spray-painted the windscreen.
The deadliest recent attack in Spain was in March 2004, when Islamist militants placed bombs on commuter trains in Madrid, killing 191 people and wounding more than 1,800.
Reporting by Madrid newsroom, writing by Mark Trevelyan; Editing by Alison Williams