Police were on Saturday searching for the driver of a van that plowed into a crowd in Barcelona, killing 13 people, but the government said the suspected Islamist militant cell behind the attack had been dismantled.
Police have arrested four people in connection with the attack in Barcelona on Thursday and another in the Catalan seaside town of Cambrils, where a woman was killed when a car rammed passersby early on Friday.
Police shot dead five attackers in Cambrils and said they were wearing fake explosive belts and had an axe and knives in the vehicle.
None of the five are believed to be the driver who sped into Las Ramblas, leaving a trail of dead and injured among the crowds of tourists and local residents strolling in the Barcelona boulevard.
Catalan police said they were still looking for a man identified by the mayor's office in the town of Ripoll, where several of the suspected attackers lived, as 22-year-old Younes Abouyaaqoub.
Spanish media reported that Abouyaaqoub was the driver of the van in Barcelona but the police could not confirm it.
The Spanish government said it now considered the cell behind the attacks out of action, though police in Catalonia would not confirm this.
"The cell has been fully dismantled in Barcelona, after examining the people who died, the people who were arrested and carrying out identity checks," Interior Minister Juan Ignacio Zoido told a news conference.
He said Spain was maintaining its security alert level at four, one notch below the maximum level that would indicate another attack was imminent, but would reinforce security in crowded areas and tourist hotspots.
In the past 13 months, militants have used vehicles as weapons to kill nearly 130 people in France, Germany, Britain, Sweden and Spain.
The driver in the Barcelona attack abandoned the van and fled on foot on Thursday after plowing into the crowd. Fifty people were still in hospital on Saturday following that attack, with 12 in a critical condition.
Many were foreign tourists. The Mediterranean region of Catalonian is thronged in the summer months with visitors drawn to its beaches and the port city of Barcelona's museums and tree-lined boulevards.
Islamic State claimed responsibility for the attacks in Cambrils and Barcelona, a statement by the jihadist group said on Saturday.
Police raided a flat in Ripoll on Friday, its ninth raid on homes in the town so far, in its hunt for people connected to the attacks.
The latest flat raided had been occupied by a man named as Abdelbaki Es Satty, according to a search warrant seen by Reuters. Neighbors said he was an imam. His landlord said he had last been seen on Tuesday.
Scraps of paper covered in notes were strewn around the flat, which had been turned upside down during the police search.
Three Moroccans and a citizen of Spain's North African enclave of Melilla have been arrested so far in connection with the attacks.
Another three people have been identified but it is unclear whether they are still at large. Spanish media said two of them may have been killed in Alcanar, where a house was razed by an explosion shortly before midnight on Wednesday, and the third is Abouyaaqoub.
Police believe the house in Alcanar was being used to plan one or several large-scale attacks in Barcelona, possibly using a large number of butane gas canisters stored there.
Of the 14 dead in the two attacks, five are Spanish, two are Italians, two are Portuguese, one Belgian, one Canadian and one U.S. citizen, emergency services and authorities from those countries have confirmed so far.
A seven-year-old boy who had been missing since the attack in Barcelona was found on Saturday in one of the city's hospitals and was in a serious condition, El Pais newspaper reported.
Spain's King Felipe and Queen Letizia visited the injured - who are of many different nationalities ranging from France and Germany to Pakistan and the Philippines and are in various Barcelona hospitals.