Spanish police say they have shot dead five suspected terrorists in the town of Cambrils in a second vehicle attack, after an earlier one in Barcelona killed 13 people and injured dozens.
The men were linked to the Barcelona attack, police say.
Police are still hunting the man who drove his van into crowds on Las Ramblas in Barcelona on Thursday.
Spain’s PM Mariano Rajoy described it as a “jihadist attack”, which so-called Islamic State said it had carried out.
Mr Rajoy has announced three days of national mourning and a minute’s silence will be held later on Friday.
Seven people, including a police officer, were wounded when a car was driven into them early on Friday, Catalan emergency services said. One person is in a critical condition.
The attackers’ vehicle overturned and when the men got out they were quickly fired upon by police, media say. One was reportedly brandishing a knife.
The men were wearing explosive belts, police said, and a series of controlled explosions was carried out. The belts proved to be fake, Catalan regional head, Carles Puigdemont, later told local radio. Police say the situation in Cambrils – a popular seaside resort 110km (68 miles) south-west of Barcelona – is now under control.
A rented van was driven down Las Ramblas, a popular street in the centre of the city on Thursday afternoon, mowing down tourists and locals. Witnesses said the van deliberately targeted people, weaving from side to side.
The driver of the van, believed to be the sole attacker, fled on foot and is still being hunted by police.
Las Ramblas is a central boulevard that runs 1.2km (0.75 miles) through the centre of Barcelona 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.
Citizens of some 24 countries were killed or injured in the Las Ramblas attack, the Catalan government has said. One Belgian national has been confirmed dead.
France’s foreign ministry said on Friday that 26 French nationals were injured, with at least 11 in a serious condition.
Hong Kong, Taiwan and Greece are among those saying their citizens were injured. German, Pakistani and Philippine nationals were also among the casualties, the Catalan government said.
Two people were detained on Thursday over the Las Ramblas attack, but not the driver of the van. One of those held is Driss Oubakir, whose documents were used to rent the van, local media say. They say he is in his 20s, and was born in Morocco. However, latest reports suggest he has told police he was not involved, and that his documents were stolen.
Spanish media report that his younger brother, Moussa Oubakir, is being sought in connection with the Las Ramblas attack. The second man arrested was born in Melilla, the autonomous Spanish city on the north coast of Africa. He has not been named.
On Friday, police announced a third arrest had been made in the Catalan town of Ripoll.
So-called Islamic State has said it was behind the Las Ramblas attack, saying in a brief statement carried by its Amaq news agency that it was carried out by “Islamic State soldiers”. The group gave no further evidence or details to back this claim.
Alcanar, Wednesday evening: An explosion rips through a house in the small town, 200km south of Barcelona. One person dies. Police chief Josep Lluis Trapero said it appeared the residents at the house had been “preparing an explosive device”. A Catalan government official says a cell may have intended to use gas canisters in the Las Ramblas attack.
Barcelona, Thursday 16:50 (14:50 GMT): A white Fiat van drives down Las Ramblas in central Barcelona, killing 13 people and injuring scores. The driver flees on foot
Vic, Thursday 18:30: Police find a second van, thought to be a getaway vehicle, in the town, 80km north of Barcelona.
Sant Just Desvern, 19:30: A car is driven into officers at a checkpoint on the outskirts of Barcelona. A man is found dead in the car but the interior ministry denies earlier reports he was killed by police gunfire. The dead man is not believed to be linked to the Las Ramblas attack, officials say, but investigations are ongoing.
Cambrils, Friday 01:00: Police stop a second vehicle attack in the resort south of Barcelona, killing five terrorist suspects said to be linked to the Las Ramblas attack
Trump pushes debunked ‘pig’s blood’ myth, hours after Barcelona attack.
Barcelona is just the latest European city to witness the terrible effects of a vehicle attack on an iconic or “soft” target.
In Nice a year ago, Bastille Day celebrations were targeted, then a Christmas market in Berlin. In London, Westminster and London Bridge, as well as Finsbury Park, saw cars and vans used as weapons.
In the UK, new barriers have been put in place to mitigate some of the risks at key locations and there is discussion of imposing checks on those renting vans, but security services in Britain – as well as across Europe – are all too aware that there are limits to what they can do to spot and stop those planning murder in this way.
The weapons employed are readily available and there is little or no training, co-ordination or planning required. This means there are few points where individuals can be spotted by the intelligence services.
Although so-called Islamic State has released a statement saying what it calls its “soldiers” had carried out the Barcelona attack, it is not yet clear whether there was any direct link to the group or if they were simply inspired by its call to act. The language used often indicates the latter. Either way, authorities will be bracing themselves for the possibility of further attacks of a similar nature.
Europe’s Deadly Vehicle Attacks
Paris, 9 August 2017: A man rammed a BMW into a group of soldiers, injuring six.
London, 19 June 2017: A man is killed in a van attack on Muslims outside a mosque in Finsbury Park.
London, 3 June 2017: Eight people died when three jihadists drove a van into pedestrians on London Bridge and then stabbed passers-by.
Stockholm, Sweden, 7 April 2017: Uzbek Rakhmat Akilov killed four people when he drove a lorry into a department store.
London, 22 March 2017: Four people died when a car rammed into pedestrians on Westminster Bridge, and the driver then stabbed to death a policeman.
Berlin, Germany, 19 December 2016: Tunisian Anis Amri ploughed a truck into a Christmas market at Breitscheidplatz, killing 12 people.
Nice, France, 14 July 2016: Tunisian Mohamed Lahouaiej-Bouhlel drove a truck into crowds on the Promenade des Anglais, killing 86 people on Bastille Day.
France, December 2014: A van was driven into a Christmas market in Nantes and a car rammed pedestrians in Dijon, leaving more than 20 wounded.