ALSO READSpanish police say driver of Barcelona rampage van identified Barcelona terror attack: A long war against Islamic State is our reality Paris, UK, Barcelona attacks: How vehicles have become new terror weapon Barcelona terror attack: Shaken Twitterati offer condolences, support After Barcelona attack, another car attack in Cambrils injures seven
Citing a Sky News report, Xinhua said that the two suspects -- Chemlal and Driss Oukabir -- have been charged with murder, membership of a terror organisation and the possession of explosives. They are being held in prison without bail.
A third suspect, Salah el Karib, will be detained for another 72 hours while he is investigated further. The fourth, Mohammed Aalla, has been freed because the evidence against him is weak.
The quartet of the 12-man terrorist cell responsible for last week's attacks in Barcelona and Cambrils appeared at the Spanish National High Court here on Tuesday.
Houli Chemlala, who was the first to speak before the judge, is reported to have testified that the terrorist cell had planned to destroy "important monuments in Barcelona" before a gas explosion in the house where they were preparing the attacks left him injured and two members of the cell dead.
Those replies matched what he told the Catalan regional police in the five days he had been maintained incommunicado under their custody.
Chemlal was accompanied to the court in Madrid by Mohamed Houli Chemal, Dris Oukbar, Mohammed Alla and Salh Karib, all of whom were detained in the town of Ripoll, in Girona province, to the north of Barcelona.
Dris is the older brother of one of the terrorists who was shot by police during the attack on Cambrils in the early hours of Friday morning.
He handed himself into police on Thursday, saying his brother had stolen his driving license, which was used to rent the van that killed 13 people on Barcelona's Las Ramblas street on Thursday afternoon.
El Karib, who is the owner of a call centre in the town of Ripoll, where three of the terrorists were arrested, told the court he had only helped members of the cell buy air tickets in order to earn a commission on the sale.
Aallaa, whose brother also died in Cambrils, told the judge that the although the Audi A3 used in the attack in which 5 terrorists, including his brother, were shot dead, was in his name, it was only for "insurance issues".
The quartet were brought to Madrid on Monday night and kept in the Civil Guard headquarters in nearby Tres Cantos, before arriving at court at around 8 a.m. and starting their declarations an hour later.