Here’s what we know so far about what happened.
The attack began at 16:50 local time (14:50 GMT).
Witnesses described seeing a white van zig-zagging at speed along the pedestrianised area, deliberately targeting people, knocking many to the floor and sending others fleeing for cover in shops and cafes.
Catalan officials confirmed that 13 people had died. More than 100 were injured, 15 of them seriously.
One Belgian woman is among the dead, Belgium’s Deputy Prime Minister Didier Reynders said on Twitter
Where did the attack take place?
The van was driven down Las Ramblas – a central boulevard that runs 1.2km (0.75 miles) through the centre of Barcelona.
The boulevard runs from the city’s Plaça de Catalunya (Catalonia Square) to the Christopher Columbus monument at the seafront.
It is popular with tourists because of its market stalls, bars and restaurants.
Was there a second attack?
Police have confirmed two police officers were run over by a vehicle at a checkpoint. There is no evidence to suggest this was linked to the Ramblas attack.
However, police have linked the Ramblas attack to an explosion on Wednesday night which completely destroyed a house, left one person dead and seven more with injuries.
The house, in Alcanar, about 125 miles (200km) south of Barcelona, was filled with bottles of propane and butane, Spanish newspaper El Pais reported (in Spanish).
Who carried out the attack?
Two people have been arrested in connection with the incident, one born in Morocco and one born in the Spanish enclave of Melilla, north Africa.
Police also released a picture of the man who allegedly rented the van. However, local media have since reported the man – named as Driss Oukabir – has handed himself in to police and told them his papers were stolen and used without his knowledge.
Police chief Josep Lluís Trapero said neither of the men arrested were the driver.
Spain’s national public broadcaster RTVE has also reported that the vehicle used was rented in the city.
A second van linked to the attack has been found in the small town of Vic, north of Barcelona, local authorities said.
The Islamic State militant group claimed the perpetrator was one of their “soldiers” in a release sent out via their self-styled news agency, Amaq.
However, they have offered no proof of this