The driver who drove into throngs of strollers along Barcelona’s famed Las Ramblas avenue was shot dead by Spanish police on Monday.
Police said they tracked 22-year-old extremist Younes Abouyaaqoub to a rural area near Barcelona and shot him after he held up what looked like an explosives belt.
His death ended a five-day manhunt for the perpetrator of Spain's deadliest attack in over a decade.
"Shortly before 5 p.m., the police shot down Younes Abouyaaqoub, the driver of the van in the attack that killed 14 people in Barcelona," Carles Puigdemont, head of the Catalonia regional government, told a news conference. He said the bomb belt turned out to be a fake one.
Abouyaaqoub had been on the run since Thursday evening, after he drove at high speed into throngs of strollers along Barcelona's most famous avenue, Las Ramblas. After fleeing the scene, he hijacked a car and fatally stabbed its driver. Thirteen people were killed in the attack.
An employee at a petrol station, along an empty stretch of road between the towns of Subirats and Sant Sadurni d'Anoi, spotted a man resembling Abouyaaqoub and called the police.
Sant Sadurni Mayor Maria Rosell said all police forces in Catalonia converged on the town. Police found Abouyaaqoub hiding in vineyards and shot him dead a kilometer down the road next to a sewage treatment plant.
The scene unfolded 40 km (25 miles) from the spot, close to the FC Barcelona football stadium on the outskirts of the city, where police said Abouyaaqoub had seized the hijacked car.
Police said Abouyaaqoub had first fled Las Ramblas on foot amid the chaos of the attack, then commandeered the car, stabbing the driver, 34-year-old Pau Perez, to death before smashing his way through a police checkpoint and ditching the car in the nearby town of Sant Just Desvern.
ISIS claimed responsibility for the attack, which police believe was planned by a dozen accomplices, including a brother and two first cousins of the Moroccan-born Abouyaaqoub.
Abouyaaqoub had been the only one of 12 accomplices still at large. His mother, Hannou Ghanimi, had appealed for him to surrender, saying she would rather see him in jail than dead.
Of the other 11 in the militant cell, five were shot dead by police hours after the van attack, two were killed and one injured the day before in a blast in a house where they were apparently making explosives, and three were arrested elsewhere.
The four people arrested so far in connection with the attacks are three Moroccans and a citizen of Spain's North African enclave of Melilla. They were taken on Monday to the high court in Madrid, which has jurisdiction over terrorism matters.
Abouyaaqoub lived in Ripoll, a town in the Pyrenees mountains north of Barcelona close to the French border.
ISIS also claimed responsibility for a separate deadly assault, hours after the van attack, in the coastal resort town of Cambrils, south of Barcelona.
In Cambrils, a car rammed into passersby and its occupants got out and tried to stab people. The five assailants were shot dead by police, while a Spanish woman died in the attack.
In the roughly seven hours of violence that followed the van's entry into the central promenade of Las Ramblas on Thursday afternoon, attackers killed 15 people: 13 on Las Ramblas, the Cambrils victim and the man in the hijacked car.
Of the 120 injured on Las Ramblas, eight remain in a critical condition in hospital.
An official in Spain said that authorities have identified all 15 victims killed in the attacks last week.
Catalan justice minister Carles Mundo said that the fatalities are eight males, including two minors, and seven women.
Earlier, Spain's Interior Minister Juan Ignacio Zoido met with representatives of almost all political parties to brief them about the investigation into last week’s deadly Catalonia attacks.
It was the first time the anti-terror group has met since the deadly attacks in the French city of Nice last year. The governing Popular Party and the main opposition Socialists set up the group in 2015.
Lawmakers of all other parliamentary parties are attending the meeting in Madrid, either as participants or as observers, except for a coalition of Basque nationalist parties who have criticized the government's anti-terrorism policies.
Zoido was expected to explain the decision to not upgrade the country's terrorism alert level after the attacks in Barcelona and a nearby coastal town.