Two suspects allegedly connected to the terror cell behind attacks in Barcelona and Cambrils, Spain, were formally charged at a preliminary hearing on Tuesday with membership in a terrorist organization, murder and explosives possession.
Mohamed Houli Chemlal and Driss Oukabir were charged by Madrid's High Court.
Two other men arrested in connection with last week's terror attacks also appeared in court on Tuesday.
Salah El Karib will be held for further questioning. Mohamed Aalla was released and has to appear in court every Monday, a court document says.
Those four suspected members of the cell were in court less than 24 hours after police killed Younes Abouyaaqoub, the suspected driver of the van in Barcelona.
The attack killed 13 people and injured more than 100 others.
Also Tuesday, Spanish authorities said they have identified the body of Abdelbaki Es Satty, an imam who died in a house explosion in Alcanar last Wednesday night, a court document says.
A second body has not been identified.
Investigators also recovered butane bombs, TATP and several ISIS-related documents inside the house, including plane tickets to Brussels, Belgium, the document says.
Audi caught on camera in France
Officials also revealed that a vehicle used in another deadly attack last week had been seen earlier in France.
The car, an Audi A3, was caught speeding on camera in Paris in the days before Friday's attack in the Spanish town of Cambrils, French Interior Minister Gérard Collomb said.
One woman was killed when the vehicle mowed down pedestrians early Friday in Cambrils. The five assailants in the car were shot dead by police at the scene.
The Cambrils attack came hours after the Barcelona attack.
Collomb told CNN affiliate BFMTV on Tuesday he was unsure why the car in the Cambrils rampage had been in Paris and said the terror cell behind the attacks was not on the radar of French authorities.
Also Tuesday, Moroccan security forces detained a 34-year-old man in Oujda, Morocco, near the Algerian border, state-run television reported, citing sources close to the investigation. The man was detained for possible links to the Barcelona attack, the station said.
The man resides in Ripoli, Spain, north of Barcelona, the same town where eight of the 12 terror cell members lived.
Moroccan security forces are working with Catalan authorities and have sent experts to Spain to assist with the investigation.
Van driver shot dead
Police deployed a robot to remove what turned out to be a fake explosives belt from Abouyaaqoub's body before officers were cleared to approach it and make a positive identification, authorities said Monday. The suspect had knives in his possession when he was shot, said José Lluís Trapero, head of Catalan police.
A woman alerted authorities after seeing police photos of Abouyaaqoub and becoming suspicious that the man was wearing long sleeves when it was hot outside, Trapero said. Witness accounts suggest Abouyaaqoub was alone when police arrived, Trapero said.
Abouyaaqoub, a 22-year-old Moroccan, was the suspected driver of the van that sped down Las Ramblas in the center of Barcelona on Thursday, leaving dead and injured people in its wake.
Investigators said Abouyaaqoub fled the scene on foot and hijacked a car to escape. Abouyaaqoub allegedly stabbed the owner of the car, Pau Pérez, as he parked the vehicle, and drove off with the man's body in the car. Pérez later was found dead in the vehicle, making him the 15th victim of the attacks in Barcelona and Cambrils.
Police fired on the car after it rammed through a checkpoint, but Abouyaaqoub was able to flee a second time.
Authorities said none of the 12 suspects had any previous link to terror activities.
Imam link
The investigation has focused on a property in Alcanar, a coastal village southwest of Barcelona, that exploded last week before the attacks.
The house is suspected of having been used as a base to make bombs that could have caused even more devastating attacks had they not blown up prematurely.
A source briefed on the probe said a preliminary assessment indicated traces of the powerful explosive TATP in the rubble. TATP was used in a series of deadly bombing attacks in Europe in recent years.
Police believe Muslim cleric Abdelbakir El-Satty is among those who died in the Alcanar blast.
The cleric once served a jail sentence for drug trafficking in the eastern Spanish province of Castellon, Catalan Justice Minister Carles Mundó i Blanch said.
Some Spanish media reported he shared a jail cell with one of the terrorists involved in the 2004 Madrid bombings that killed at least 191 people and left hundreds injured.
Responding to those reports, Blanch said, "We are not aware that this person had any communication with any inmate in any prison in Catalonia. He finished his sentence and went free."