One of the suspects accused of being part of a cell behind the twin terror attacks in Spain fears he will be attacked in prison. As the country continues to mourn the 15 people killed in the Barcelona and Cambrils vehicle attacks, a dishevelled-looking Driss Oukabir appeared more concerned with his own wellbeing when he arrived in court.

The 28-year-old asked the judge what prison he was being sent to while his alleged involvement in the attacks was being probed by police – and whether it would be safe from other prisoners hoping to carry out a revenge attack.

The court hearing on Tuesday 22 August also saw him ask after his girlfriend, Spain's EFE news agency reported. Oukabir admitted to the judge that he rented two vans used to carry out the attacks on Thursday and Friday.

But he denied being part of the 12-strong terror cell said by investigators to have orchestrated the plots – saying he believed the vans would be used for a house move.

Oukabir, of Moroccan origin, was one of four terror suspects to appear before Spain's National Court in Madrid. His younger brother Moussa was one of the five radicals shot dead by police in Cambrils. National Court Judge Fernando Andreu questioned the four suspects about the vehicle attacks as well as the fatal explosion at a bomb-making workshop on Wednesday 16 August.

Suspect Mohamed Houli Chemlal, a Spanish national from north African enclave Melilla, confirmed what police had already concluded: that the terror cell had been planning a large-scale attack before an explosion ripped through their bomb factory at a house in Alcanar.

The 21-year-old said the bombing targets included Barcelona's iconic Sagrada Familia church, court officials said. Two of the plotters were killed in the blast, with Houli Chemlal the only survivor.

Police found in the house over 100 tanks of butane gas and materials to make TATP, an explosive dubbed the "Mother of Satan" which is frequently used in attacks by Islamic State militants. The terrorist group has claimed responsibility for both attacks.

Both Houli Chemlal and Oukabir identified imam Abdelbaki Es Satty as the ideological leader of the cell, a court official said. Es Satty preached in a mosque in the northeastern town of Ripoll, home to most of the 12 men identified by police as suspected members of the cell. His remains were amid the rubble of the explosion in Alcanar.

Driss Oukabir
Driss Oukabir, suspected of involvement in the terror cell that carried out twin attacks in Spain, is escorted by Spanish Civil Guards from a detention center in Tres Cantos, near Madrid, on August 22, 2017 before being transferred to the National Court Getty

The other two suspects who testified in court, Mohamed Aalla and Sahal El Karib, denied being part of the cell. Aalla said an Audi A3 used in the Cambrils attack was registered under his name but used by a sibling.

Police say one of Aalla's younger brothers died in Cambrils and another one is believed to be the second casualty in the Alcanar house blast where the imam died. El Karib, the owner of a cybercafe in Ripoll, was asked about buying at least two plane tickets for two alleged members of the cell. He told the judge that he was only trying to make a profit.

After the questioning, the judge said there was enough evidence to hold Houli Chemlal and Oukabir on preliminary charges of causing homicides and injuries of a terrorist nature and of belonging to a terrorist organisation. Houli Chemlal also has an additional charge of dealing with explosives.

However, the judge ruled the evidence was "not solid enough" to keep holding Aalla, who was freed on condition he appear in court weekly, relinquish his passport, and not leave Spain. El Karib will remain in custody for at least 72 more hours while police inquiries continue, the judge said.