The terror cell that killed 15 people and injured more than 130 in north-east Spain last week had created a suicide vest packed with viable explosives and were in the process of making several more when a blast ripped through their bomb factory, police have said.

A search of the rubble at the factory in a disused house in Alcanar in southern Catalonia resulted in the discovery of the vest, which had gone unnoticed on Thursday last week when the blast was initially dismissed as an accidental gas explosion.

Questions are being asked about the Catalan police response to the blast, with sources close to the judicial investigation in Madrid suggesting they may have missed an opportunity to uncover the plot before the terrorists struck later that day in Barcelona.

Quoting two sources close to the investigation in Madrid, Reuters news agency said an opportunity to uncover the plot may have been missed as a result of procedural errors and a lack of communication.

No immediate decision was made to call explosives experts to the scene of the blast, and nor was information about it passed to the national police or Civil Guard headquarters in Madrid, according to the sources.

The Catalan police, the Mossos d’Esquadra, are a source of pride for many in the region, and some in Barcelona have been applauding officers in the streets since six members of the terror cell were shot dead. The head of the force, Josep Lluís Trapero, has said he believes it is unfair to make criticisms with the benefit of hindsight.

In the immediate aftermath of the attacks, the regional government and central government held separate meetings to determine responses to the crisis. Since then, however, they have sought to present a united front when issuing statements about the attacks and the official response.

Police have also established that the terror cell purchased about 500 litres of acetone, with which it planned to manufacture triacetone triperoxide (TATP), a highly volatile explosive that is sensitive to temperature change or impact.

The cell also bought 15 pillow cases, which police believe were going to be used to make further suicide vests, as well as detonators and nails that were to be used as shrapnel. About 120 32kg butane gas bottles have been recovered from the scene of the blast.

On Tuesday, the only survivor of the bomb factory blast, Mohamed Houli Chemlal, was brought before a judge in Madrid for a closed hearing. According to judicial sources inside the court, Houli told a judge that the cell had hoped to kill and injure large numbers of people with three bombs made of TATP and gas bottles.

Houli, 21, was brought to court in hospital-issue pyjamas, showing signs of injuries on his face, ankles and arm.

According to reports in Spanish media, he disclosed that the planned targets included the Sagrada Família, Antoni Gaudí’s much-loved, half-finished church in Barcelona.

The cell changed its plans after the premature detonation destroyed its bomb factory, killing two people including their alleged ringleader, Abdelbaki Es Satty.

A new plan was rapidly hatched, resulting in one cell member, Younes Abouyaaqoub, driving a hired Fiat van along Las Ramblas in Barcelona, killing 13 people and injuring more than 130. After stabbing to death a motorist during his escape, he went into hiding for 96 hours. He was shot dead by police on Monday after being spotted by a member of the public 30 miles west of Barcelona.

A few hours after the Las Ramblas attack, five other members of the cell were shot dead in the town of Cambrils, south of Barcelona, after driving their car into a group of pedestrians.

All six men were wearing fake suicide vests, which has led some observers to conclude that they wanted to be shot dead.

Almost all of the dead men and suspects had been living in the northern Catalan town of Ripoll, where Es Satty had been appointed as an imam two years ago, despite having served a prison sentence in Spain for drug smuggling.

On Tuesday evening, a judge in Madrid, Fernando Andreu, ordered that Houli and a second suspect, Driss Oukabir, 27, be held while police prepare charges. Andreu gave permission for a third suspect to be held for a further 72 hours, and told a fourth that he was being released without charge.

On Wednesday, French authorities disclosed that a number of the terror suspects drove to the Paris region a few days before the attacks in the same Audi car that was used in the Cambrils attack. French and Spanish police are attempting to establish the purpose of the visit.

Frédéric Molins, the Paris public prosecutor, said: “We are trying to determine the precise reason for this journey and if the terrorists were in contact with other people on our territory.”

The group, believed to be three or four men, stayed in a hotel. Molins said he would not give further information, but added that the French and Spanish authorities were cooperating closely.