An alleged member of an Islamist cell suspected of carrying out last week's deadly Barcelona van attack told a Spanish court on Tuesday that the group had been planning a much bigger strike using explosives, a judicial source said.

The testimony to a closed hearing at Spain's High Court came from Mohamed Houli Chemlal, one of four detained suspects brought to Madrid to testify for the first time in court about the plot.

Two of the suspects told the court that Abdelbaki Es Satty, the imam in the small town in northeastern Spain where many of the group came from, was the instigator, the source said.

The official said Chemlal told a judge that the cell was preparing to attack Barcelona monuments with explosives and the imam intended to blow himself up when they did.

People gather around an impromptu memorial a day after a van crashed into pedestrians at Las Ramblas in Barcelona, Spain August 18, 2017. SERGIO PEREZ/REUTERS

The public prosecutor had asked the judge to send all four to jail while investigations continued.

El Mundo newspaper said Chemlal told the court that the group planned to attack architect Antoni Gaudi's landmark Sagrada Familia church and other Barcelona monuments but this could not be immediately confirmed.

Chemlal was arrested after being hurt in a blast at a house in Alcanar, southwest of Barcelona, a day before Thursday's van attack on the crowded Las Ramblas boulevard in Barcelona, which left a trail of 13 dead and 120 injured people from 34 countries.

Thank you for signing up.

Oops. Something went wrong.

Thank you,

The 21-year-old arrived at court wearing hospital-issue pajamas, with a bandaged hand and cuts to his face and bare ankles.

Police found 120 butane gas canisters and traces of a home-made explosive in the rubble of the house at Alcanar, where they say two of the plotters were killed. They believe that the accidental explosion led the group to abandon plans for a bomb attack and to stage a vehicle assault instead.

Tuesday's court hearing was the first in a long legal process, and it could be months or even years before the case is brought to a full trial.

The four are the only alleged members of the group still alive after the driver of the van that ploughed through the crowd in Barcelona, 22-year-old Younes Abouyaaqoub, was shot and killed by police on Monday.

Resort attack

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

In Cambrils, a car rammed passersby and its occupants got out and tried to stab people. The five assailants, who were wearing what turned out to be fake explosive belts, were shot dead by police, while a Spanish woman died in the attack.

Families of young men believed responsible for the attacks in Barcelona and Cambrils gather along with members of the Muslim community to condemn terrorism in Ripoll, north of Barcelona, Aug. 19, 2017Francisco Seco/AP

Most of the 12 suspects lived in the town of Ripoll, set in forested hills beneath the Pyrenees north of Barcelona, and most were young men of Moroccan descent.

The four suspects in court on Tuesday were questioned one-by-one by the investigating judge, Fernando Andreu.

Driss Oukabir, 28, whose passport was found in the abandoned van after the Barcelona attack, has maintained his innocence. He told the court that he rented vans used in the attack but believed they were for a house move, according to Europa Press news agency.

Also in court were Mohammed Aalla, 27, owner of the Audi car used in the Cambrils attack, and Salah el Karib, 34, who ran an internet cafe in Ripoll that, according to La Vanguardia newspaper, was used to send money to Morocco.

No charges against the men have yet been specified.

Es Satty, the Ripoll imam who police suspect radicalised the young men, is believed to have died in the Alcanar explosion.

An investigation into whether the cell had international links goes on, police have said.

La Vanguardia said Moroccan authorities had arrested a man who had been in touch with Moussa Oukabir, one of the suspects killed by police in Cambrils, and may have played a role in connecting the Catalan cell with Islamic State.

French Interior Minister Gerard Collomb on Tuesday confirmed press reports that the Audi used in the Cambrils attack had been caught on camera speeding in the Paris region days before the Catalonia attacks.

But he told BFM TV that French authorities had been unaware of the existence of the Catalan cell, saying they were "exclusively Spanish."

BFM TV later reported that it had been Abouyaaqoub and an accomplice who travelled to the Paris region the weekend of Aug. 12-13, staying overnight at a hotel.

Spanish police have sought information from Belgian authorities on a visit the imam, Es Satty, made there last year.

Haaretz.com, the online edition of Haaretz Newspaper in Israel, and analysis from Israel and the Middle East. Haaretz.com provides extensive and in-depth coverage of Israel, the Jewish World and the Middle East, including defense, diplomacy, the Arab-Israeli conflict, the peace process, Israeli politics, Jerusalem affairs, international relations, Iran, Iraq, Syria, Lebanon, the Palestinian Authority, the West Bank and the Gaza Strip, the Israeli business world and Jewish life in Israel and the Diaspora.