An explosion on Wednesday night that killed at least two people destroyed the house, in the town of Alcanar, about 120 miles southwest of Barcelona. At first thought to be a gas explosion, the blast now appears to have been the hub of a wider plot to sow terror.
Some of the 12 members of the cell had occupied the house for at least six months, Major Trapero said. He said that one man injured in the explosion in Alcanar on Wednesday was arrested after the attack in Barcelona.
“There is explosive material that keeps appearing among the ruins, and it’s a very slow process,” Major Trapero said of the investigation at the house, adding that “it will probably take days.”
Along with the house in Alcanar, the authorities were focusing on Ripoll, a town about 70 miles north of Barcelona, not far from the Pyrenees.
Ripoll was the home of most of the suspects involved in the terrorist plot, according to the authorities, including Abdelbaki Essati, the local imam, one of two men who may have died in the Wednesday explosion.
Five of the 10 other men believed to have been involved in the cell were killed in Cambrils, and four are under arrest, officials said. Mr. Abouyaaqoub is thought to have been the driver of the van. The authorities said it was possible that he had slipped into France.
Investigators are trying to establish the role of the imam, Mr. Essati, in the cell. He had been connected to extremists more than a decade earlier, and he shared an apartment in the town of Vilanova that the police raided in 2006 as part of an investigation into another cell that also recruited fighters for Iraq, according to local news reports.
The imam is also believed to have been connected to Mohamed Mrabet Fhasi, who tried to help a militant escape after the 2004 Madrid train bombings. Mr. Essati served time in prison, but on charges related to drugs, not terrorism.
Major Trapero declined to give details on Sunday about the investigation into the imam’s possible role, but he reiterated that neither the imam nor the members of cell, many of whom were teenagers, had known links to terrorism.
Major Trapero also said that investigators were using information received from “some other countries” and looking into possible overseas trips by members of the cell ahead of the attacks. But he would not elaborate on whether the cell had links to extremists in other parts of Europe and Morocco.
Even though not all members of the cell are accounted for, “we consider that the capacity to act of this cell has been neutralized,” Joaquim Forn, a member of Catalonia’s regional government, said on Sunday.
The original plan for attack involved at least three vans, as well as the Audi car that five assailants used in the attack in Cambrils. Major Trapero said investigators were using fingerprints from the vehicles to confirm the exact whereabouts of the assailants.
“In recent months, this group had planned one or more attacks in the city of Barcelona with which they hoped to do a lot more damage than what they already managed,” he said.
The authorities called on citizens to join a demonstration on Saturday in Barcelona to condemn terrorism and extremism.
“They tried to bring us to our knees in Barcelona, but we’re going to get up even stronger,” said Carles Puigdemont, the leader of Catalonia.
He and hundreds of other mourners, including King Felipe VI, Prime Minister Mariano Rajoy and the Portuguese prime minister, António Costa, gathered at Sagrada Familia, the basilica that is perhaps the most famous landmark in Barcelona, to honor the victims. The city’s archbishop, Cardinal Joan Josep Omella, called the crowd a “beautiful mosaic” of unity working toward “peace, respect, fraternal coexistence and love.”
At the Vatican, Pope Francis deplored deadly terrorist attacks this month in Burkina Faso, Spain and Finland, entreating God “to free the world from this inhuman violence.”
The pope, in a message that Cardinal Omella read aloud, called the violence in Spain a “cruel terrorist act” and a “grave offense to God.”
Several cities in Italy, which lost three citizens in the attacks, have tightened security, amid alarm that Italy might be a target.
In Milan, concrete barriers were installed in streets leading to Milan’s Gothic-style main Cathedral and the adjacent Galleria Vittorio Emanuele. Florence was looking into putting in place similar impediments to track. And in Genoa and Naples, patrols were stepped up.
On Sunday, other victims in the Barcelona attack were identified: Julian Alessandro Cadman, a 7-year-old boy who was a dual citizen of Australia and Britain; and Carmen Lopardo, 80, a citizen of Italy who lived in Argentina for most of her life.
Emerging from the service in Barcelona, Maite Foronda, a medical administrator, said she had driven more than 90 miles to send a message. “We are not afraid,” she said. “We are going to go on.”
But others at the Sagrada Familia admitted that despite the declarations of courage, people were fearful of a new kind of terrorist threat that allows anyone to target civilians with something as ubiquitous and accessible as a car.
“Even though we say we are not afraid, of course we are afraid,” said Sonia Loffredo, an architect.
Mourners also expressed differing views about Muslim immigrants to Spain, who have been placed in the spotlight after it emerged that most if not all the suspects were of Moroccan descent who appeared to have been well integrated within Catalan life.
“It’s not Muslims” who are to blame, Ms. Loffredo said. “It’s just one jihadi group who were brainwashed by one person.”
Ms. Foronda disagreed. “Really, if I had a choice, in my house I wouldn’t have them,” she said. Some Muslim immigrants “are lovely,” she said, “but you never know what’s going to become of them.”