By Adrian Croft

MADRID, Aug 22 (Reuters) - Four men accused of being members of an Islamist cell behind a van attack that killed 13 people in Barcelona last week appeared in court on Tuesday, a day after the alleged driver was shot dead by police.

The four, the only ones still alive among the 12 men thought to constitute the group, were brought from Barcelona to Madrid and arrived at the High Court, which deals with terrorism cases, in a convoy of police vehicles with sirens wailing.

Police on Monday shot dead 22-year-old Younes Abouyaaqoub, who they had identified as the driver of the van that careered along the packed Las Ramblas boulevard in Barcelona on Thursday, leaving a trail of 13 dead and 120 injured from 34 countries.

After the attack, Abouyaaqoub escaped on foot, stabbing to death a man who was parking his car and fleeing in the vehicle.

Spanish newspaper La Vanguardia said on Tuesday he walked some 40 km (25 miles) from Sant Just Desvern, a town on the outskirts of Barcelona where he ditched the hijacked car, to Subirats, where he was shot dead.

Abouyaaqoub, who had changed clothes, walked by night and hid during the day, the paper said citing sources involved in the investigation. Carlos Mundo, the top justice official in the Catalan government, said police were investigating whether Abouyaaqoub had any support while on the run. "It is clear that he must have had some form of logistics," he told Catalonia Radio.



FAKE BELTS

Islamic State claimed responsibility for the van attack and a separate deadly assault, hours later, in the coastal resort of Cambrils, south of Barcelona.

In Cambrils, a car rammed into passers-by 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.

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

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

One of those who appeared before investigating magistrate Fernando Andreu was Driss Oukabir, whose passport was found in the abandoned van after the Barcelona attack.

He turned himself in to police, protesting his innocence and saying his younger brother Moussa Oukabir, 17, who was killed in Cambrils, had stolen his documents.

Also in court was Mohammed Aalla, owner of the Audi car used in the Cambrils attack. One of his brothers, Said, was killed in Cambrils and a second, Youssef, is believed by police to have died in an explosion at a house used by the plotters at Alcanar, southwest of Barcelona, the day before the Barcelona attack.

Mohamed Houli Chemlal, arrested after being hurt in the blast at Alcanar, also appeared in court as did Salah el Karib, who ran an internet cafe in Ripoll that, according to La Vanguardia newspaper, was used to send money to Morocco.

At Tuesday's closed-door hearing, Andreu planned to read out charges against the men expected to include counts of terrorism, murder and weapons possession. Andreu was then to ask the accused if they wish to testify, in which case he would question them.

The hearing was likely to end in the suspects being remanded in custody while the judge conducts an investigation that could take months or even years before a trial is organised.

A Ripoll imam who police suspect may have radicalised the young men, Abdelbaki Es Satty, is believed to have died in the explosion in Alcanar. Police believe the blast foiled the group's plans for a much bigger attack using explosives.

Catalan police said on Monday that, while all 12 of the suspects they were looking for were accounted for, an investigation into whether the cell had international links would go on.

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 area about a week earlier. Authorities did not know why it was there, he said.

French authorities were unaware of the existence of the Catalan cell, Collomb told BFM TV, saying they were "exclusively Spanish".

Spanish police have sought information from Belgian authorities on a visit the imam, Es Satty, made there last year. (Editing by Julien Toyer and Angus MacSwan) ((adrian.croft@thomsonreuters.com;))