Barcelona (CNN) The perpetrators of the terror attacks in Barcelona and Cambrils originally planned to use explosive devices to wreak greater devastation but were apparently thwarted because their materials detonated prematurely, police said Friday.

A house in Alcanar, south of Barcelona, was destroyed in a blast Wednesday night -- hours before one attacker mowed down dozens of people in the heart of Barcelona , killing 13. A group of five attackers then drove into pedestrians in the town of Cambrils, killing one, in the early hours of Friday.

Catalan police chief Josep Lluis Trapero told reporters that explosives were found in the Alcanar property and that police "are working on the hypothesis that these attacks were being prepared in that house."

A source briefed on the investigation said a preliminary assessment of the Alcanar property indicated there were traces of the powerful explosive TATP in the rubble.

TATP has been used in numerous Islamist terrorist attacks carried out in Europe, including the November 2015 Paris attacks, the March 2016 Brussels bombings, the May Manchester bombing and a failed bomb attempt by an Islamist extremist at the Gare Centrale in Brussels in June.

The explosion meant the attackers were unable to use material they were planning to deploy in attacks in Barcelona, Cambrils and perhaps elsewhere, he said. The attack in Barcelona, capital of the Spanish region of Catalonia, was therefore "more rudimentary than they originally planned," Trapero said.

The revelations pointed to the alarming possibility that authorities knew nothing of an advanced plot to mount a spectacular terror attack until an accidental explosion at the perpetrators' base -- and despite this eye-catching setback the terror cell managed to carry out two further improvised attacks without impediment.

Key developments

-- Four people have been arrested: one of them in Alcanar and three in Ripoll. Three were Moroccan citizens and another was Spanish; they ranged in age from 21 to 34. None of them had been on authorities' radar for terrorism. Police said Friday they have identified three of the suspects, but didn't name them publicly.

-- People from at least 34 countries were among the injured in the attacks, Catalan authorities said. US Secretary of State Rex Tillerson said an American citizen was among the dead. Two Italians were the first of the deceased victims to be named. Canadian PM Justin Trudeau said one of the dead was Canadian. Spain's Department of Interior said four Spaniards and one Portuguese national were killed.

-- Spain's Prime Minister Mariano Rajoy labeled the Barcelona attack "jihadi terrorism." Rajoy's government has declared three days of mourning across Spain.

-- The ISIS media wing, Amaq, has said the Barcelona attackers were "soldiers of the Islamic State," but stopped short of explicitly claiming responsibility for the attacks or providing evidence for their claims.

-- King Felipe, the Spanish head of state, led a moment's silence at Barcelona's Plaça de Catalunya -- near where the attack began. Crowds later joined in lengthy applause. "We are not afraid, we won't forget," they chanted.

King Felipe VI of Spain leads a moment of silence in Plaça de Catalunya on Friday.

An attack gone wrong

The first sign of the terror cell's activities -- although its significance was not immediately understood -- came Wednesday evening when the house in Alcanar was almost completely destroyed by an unexpected explosion.

One person, a Spanish national, died the in the blast, and another was seriously injured. Both were found inside the house. The injured man is one of the four suspects arrested. He was moved to a police station in Tortosa on Friday, Catalan police said.

Six other people were also injured in the explosion, according to a Catalan fire department report, no information was provided as to the identity of the six.

Police said Friday there were other "biological remains" found at the site, but it is unclear whether they belong to a different person.

The debris of a house in the village of Alcanar, Catalonia, is seen Thursday after it collapsed due to an explosion.

"They were trying to make explosives out of butane gas among other things," Trapero said. He speculated that "some sort of accident" caused the explosion, therefore avoiding greater catastrophe later.

Thwarted by the accidental explosion, and possibly alarmed at the attention it had drawn, it appears that the surviving members of the cell scrambled to mount an alternative plan. The next day at about 5 p.m., a rental van was driven at high speed from Barcelona's Plaça de Catalunya deep into the teeming crowds on the city's most famous thoroughfare, Las Ramblas.

"I saw people flying into the air and everyone was running into the shops on either side," witness Ali Shirazinia told CNN.

At least 13 people were killed and 120 injured. The driver of the van fled on foot. The Interior Ministry said Friday that 15 of the 59 people still hospitalized remain in critical condition.

The van used in the Barcelona attack was abandoned at the scene, August 18, 2017.

Hours later, as details of the atrocity in Barcelona were still emerging, five attackers drove an Audi A3 into several pedestrians in Cambrils, 120 kilometers (75 miles) south of Barcelona, early on Friday morning. Police engaged in a shootout with the attackers, and all five were shot dead, four of them by one officer.

A woman subsequently died from her injuries, Catalan emergency services said, taking the number of dead in both attacks to 14. Six others were injured, three seriously.

Photographs showed the black Audi, flipped upside down with its windows smashed out, being removed from the scene.

Catalan police later said they found an ax and knives in the car, and the attackers had fake explosive belts attached to them. Before being shot they had wounded one person in the face with a knife. Police were investigating whether one of the attackers was the driver of the van used in the Barcelona attack.

Police officers stand near an overturned car onto a platform at the spot where terrorists were intercepted by police in Cambrils, Friday, Aug. 18.

Alex Folch, 28, told CNN he saw the immediate aftermath of the shootout from his holiday apartment on the fifth floor of the Club Nautic Cambrils, on the Consulat de Mar.

He said he saw three people lying on the ground surrounded by police, one with what appeared to be "a metallic kind of belt" around the waist.

Folch said he could see snipers on the roof beside him and later heard controlled explosions conducted by police.

Police said later they have identified each attacker but they didn't release their names publicly.

The house in Alcanar appears crucial to the investigation. Trapero said several of its residents had hired some of the vehicles used in the Barcelona and Cambrils attacks. He added that "the investigation is centered on identifying those persons who were in that house."

A car that ran over police officers at a checkpoint in Barcelona later on Thursday was unconnected with the attacks, Trapero said. One of the occupants of the car was found to have been stabbed.

Shock and fear in Barcelona

The Catalan government said the Barcelona victims came from 34 countries.

The first to be identified was an Italian, Bruno Gulotta, who worked for Tom's Hardware Italia. He was a much-loved colleague with a partner and two young children, the company said. He had been on holiday in Barcelona with his family. The second victim named was another Italian, Luca Rosso.

Belgium's Foreign Ministry spokesman Jose de Pierpont said one Belgian was among those killed in the attack.

A 74-year-old Portuguese woman has also been identified by the Portuguese government as one of the victims in Barcelona.

Las Ramblas reopened Friday morning but reminders of the previous day's horror were all around.

In some outdoor cafés, full glasses of beer and sangria sat out on tables, left behind after people scattered. Overturned chairs and napkins were strewn on the street. Waiters were beginning to pick up the pieces as restaurants opened.

Flowers, candles and messages of solidarity piled up through the day at makeshift shrines along the street.

Some shocked residents and tourists had come to the normally bustling avenue to pay their respects to the attack victims. Others gathered for a march intended to show unity in the face of fear.

"It was an attack against humanity," Sandra Gregorio said after laying flowers at one of the many memorials that has sprung up. "Look at this street, Barcelonians are not afraid," her boyfriend Marc Guzmán added. "We have to be united, now more than ever."

Hajar Menssouri, a 24-year-old laboratory technician and student, told CNN: "I joined the march to show that fear would not divide us."

Earlier, resident Federico Colmenarejo, 32, walked along Las Ramblas in a daze. His apartment overlooks the street -- and he said a phone call from his grandmother at the time of the attack had saved his life because it had stopped him going out.

"Just to think how is it possible that I cross this street every day on my way to work. I can't believe it. In Barcelona this never happens," he told CNN.