Aleast 14 people were killed and more than 100 others injured after drivers slammed into pedestrians in two quick-succession in Spain

Aleast 14 people were killed and more than 100 others injured after drivers slammed into pedestrians in two quick-succession, separate attacks on Barcelona's most popular street and in another busy Spanish seaside town.

What happened?

An explosion in a house late Wednesday in Alcanar, about 200 kilometres south of Barcelona, left one person dead and seven wounded.

Police said they believe the occupants were preparing an explosive device and the blast could be linked to the Barcelona assault. One of three suspects later arrested was detained in Alcanar.

Around 4:50 pm (1450 GMT) on Thursday, a vehicle ploughed into a crowd of pedestrians on the famous Las Ramblas boulevard in Barcelona.

The promenade in the heart of the city is one of Barcelona's busiest streets, normally thronged with tourists and street performers until well into the night.

Witnesses described scenes of chaos and panic, with bodies strewn along the boulevard as others fled for their lives.

"There were bodies on the ground with people crowding round them," local shop worker Xavi Perez told AFP.

"People were crying. There were lots of foreigners."

The driver fled on foot and remains at large.

Second attack

Some eight hours later in Cambrils, a resort town 120 kilometres (75 miles) south of Barcelona, an Audi A3 car hit pedestrians, injuring six civilians and a police officer. One of the civilians, a woman, later died.

The five occupants of the car were killed by police, who said they were "working on the hypothesis that the terrorists shot dead in Cambrils are linked to what happened in Barcelona".

"It was bang, bang, bang. Shouting, more shouting. I threw myself onto the ground on the beach," said one witness, 21-year-old waiter Joan Marc Serra Salinas.

Who are the victims?

Emergency services said at least 14 people had died and around 100 more were injured in the two attacks.

There were at least 34 nationalities among the dead and injured who came from countries as varied as France, Pakistan, Spain, the Netherlands, China, Venezuela, Mauritania, Australia and Britain.

Rome said two Italian nationals were killed including a man who died in front of his wife and young children, and Belgium said one of its citizens was among the fatalities. France said 26 of its citizens were among the injured.

Who is behind it?

The Islamic State's propaganda agency Amaq claimed that "soldiers" from the jihadist group carried out the Barcelona attack, according to the SITE Intelligence Group which monitors Islamist websites.

"The executors of the Barcelona attack were soldiers of the Islamic State," Amaq said, quoted by SITE.

Police in the Spanish region of Catalonia where both attack sites are located said they have arrested three suspects, including a Spaniard born in Spain's north African enclave of Melilla and a Moroccan named as Driss Oukabir.

One was held in Alcanar where Wednesday's explosion took place. The two others were picked up in the town of Ripoll, 100 kilometres north of Barcelona.

But the driver of the van is still on the run.

How did authorities respond?

Emergency services quickly arrived on the scene in Barcelona and cordoned off the area, with several ambulances and police vehicles responding.

The city also closed down nearby metro stations, with authorities telling people to stay away from the area.

Police appealed to people to stay in their homes and avoid unnecessary trips.

In Cambrils, mayor Cami Mendoza praised the "speed and efficiency" of the police response.

Previous attacks in Spain

Spain was hit by what is still Europe's deadliest jihadist attack in March 2004, when bombs exploded on commuter trains in Madrid, killing 191 people in an attack claimed by Al Qaeda-inspired extremists.

In July 2015, a hooded attacker opened fire outside a hotel in downtown Barcelona near Las Ramblas boulevard, leaving two people injured, police said.

No suspected motive for that attack was given.