Spain's Supreme Court on Thursday upheld the acquittal of a top suspect in the 2004 Madrid commuter train bombings, rejecting an appeal by prosecutors on the grounds he has already been convicted of the same crime in Italy.

Rabei Osman, an Egyptian, was one of three alleged masterminds cleared of mass murder in the bombings at a trial in Madrid in October.

The court ruled that because Osman had already been sentenced to eight years in prison in Italy, he could not be condemned again for the same crime, a court official told The Associated Press on condition of anonymity because of departmental rules.

Spanish prosecutors had argued unsuccessfully that Osman was appealing his Italian sentence, leaving the door open for his trial here.

In Spain, both prosecutors and defendants can appeal lower court decisions.

Ten backpack bombs ripped through four packed trains carrying early-morning commuters on March 11, 2004, killing 191 people and injuring more than 1,800 in Europe's worst Islamic terror attack.

A two-year Spanish investigation concluded that the killings had been carried out by homegrown radicals, inspired by Al Qaeda's call to arms but with no direct link to Usama bin Laden's group.

Twenty-one people — including three masterminds — were convicted during the five-month trial that ended in October. Seven others, including Osman, were acquitted.

The Supreme Court also absolved four other men — Basel Ghalyoun, Mouhannad Almallah Dabas, Abdelilah el Fadual el Akil and Raul Gonzalez — who had all been convicted of lesser charges and sentenced from anywhere from five to 12 years.

The court slightly reduced the sentences of several others, and reversed the acquittal of Antonio Toro. The judges convicted him of exchanging explosives used in the attack for drugs and money, and sentenced him to four years.

Another convicted mastermind, Othman el Gnaoui, was cleared of the lesser charge of falsification, but would remain in jail on the more serious charges.

The Supreme Court decision all but concludes the proceedings in the case. Appeals can be made to Spain's Constitutional Court, but only on limited ground where there are claims that the constitution has been violated.

Osman was arrested in Italy in June 2004 after allegedly saying in wiretapped conversations that the attacks were his idea. He repeatedly has denied it was his voice in the calls, and his Spanish defense lawyers also questioned the translation of the call used in the Italian court.

The long trial was a painful reminder to Spaniards of one of the blackest days in the country's history.

Jesus Ramirez, a survivor of the attacks who until recently was vice president of a victims' association, said he accepted the judges' decision, even if he did not agree with it.

"Even though we may oppose it in our hearts, they have more information and have weighed the evidence and made a decision," he told the AP.