Police were searching on Saturday for the driver of a van that killed 13 people when it ploughed into a crowd in Barcelona and were trying to determine whether two other suspected Islamist militants linked to the attack had died or were at large.

The Spanish government said it considered it had dismantled the cell behind Thursday's Barcelona rampage and an attack early on Friday in the Catalan seaside town of Cambrils.

Police arrested four people in connection with the attacks Barcelona and Cambrils, where a woman was killed when a car rammed passersby on Friday. Five attackers wearing fake explosive belts were also shot dead in the Catalan town.

"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.

But authorities have yet to identify the driver of the van and his whereabouts are unclear, while police and officials in the northeastern region of Catalonia said they still needed to locate up to two other people.

Investigators are focusing on a group of at least 12 suspects believed to be behind the deadliest attacks to hit Spain in more than a decade.

In little more than a year, militants have used vehicles as weapons to kill nearly 130 people in France, Germany, Britain, Sweden and Spain.

None of the nine people arrested or shot dead by police 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 along the Barcelona boulevard.

A Moroccan-born 22-year-old called Younes Abouyaaqoub was among those being sought, according to the mayor's office in the Catalan town of Ripoll, where he and other suspects lived.

Spanish media reported that Abouyaaqoub may have been the driver of the van in Barcelona, but police and Catalan officials could not confirm this.

The driver in the Barcelona attack abandoned the van and fled on foot on Thursday after ploughing into the crowd. Fifty people were still in hospital on Saturday following that attack, with 13 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.

RAIDS

Police searched a flat in Ripoll on Friday in their hunt for people connected to the attacks, the ninth raid so far on homes in the town nestled in the foothills of the Pyrenees near the French border.

The flat had been occupied by a man named as Abdelbaki Es Satty, according to a search warrant seen by Reuters. Neighbours said he was an imam, a Muslim prayer leader. 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 in 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.

Apart from Abouyaaqoub, authorities are searching for two other people though it is not certain they are at large.

One or even both of them may have been killed in Alcanar, where a house was razed by an explosion shortly before midnight on Wednesday, a spokeswoman for Catalonia's home affairs department said.

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.

The Spanish government maintained its security alert level at four, one notch below the maximum level that would indicate another attack was imminent, but said it would reinforce security in crowded areas and tourist hotspots.

Spanish media also said that security at the border with France was being beefed up.

TRIBUTES

Of the 14 dead in the two attacks, five are Spanish, two are Italians, two are Portuguese, one Belgian, one Canadian and one a U.S. citizen, emergency services and authorities from those countries have confirmed so far.

A seven-year-old boy with British and Australian nationality 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 on Saturday visited some of the dozens injured whose nationalities ranged from French and German to Pakistani and the Filipino. They are being treated in various Barcelona hospitals.

The royal couple are expected to take part in a Catholic mass on Sunday morning at architect Antoni Gaudi's famous Sagrada Familia church, a Barcelona landmark, in honour of the victims of the attack.

Barcelona's football team will wear special shirts, bearing the Catalan words for "We are all Barcelona", and black armbands in memory of victims when they play their opening league game of the season on Sunday evening against Real Betis.