An Egyptian man who is one of the chief suspects in the 2004 Madrid train bombings was sentenced to 10 years in jail by an Italian court on Monday.

A Milan court convicted Rabei Osman Sayed Ahmed, 35, and a co-defendant, Yahia Ragheh, 23, of subversive association aimed at international terrorism, a charge that was introduced after the Sept. 11, 2001, attacks in the United States. The younger man was given a five-year term.

Italian police bugging Ahmed's apartment listened as he reacted with joy while watching a video of the beheading of American Nicholas Berg by his Al Qaeda captors in Iraq, the court heard.

"Come nearer, watch closely, this is the politics you have to follow, the politics of the sword," he advised another man as Berg's screams rang out.

"Go to hell, enemy of God, kill him, kill him, cut it well, cut off his head," he said.

Abu Musab al-Zarqawi made Al Qaeda in Iraq notorious for hostage beheadings and was believed to have killed two American captives himself — Berg in April 2004 and Eugene Armstrong.

After sentencing, both men were led out of the courtroom in handcuffs surrounded by prison guards. Ahmed, who just a few minutes earlier had been joking with guards, refused to comment to reporters.

Prosecutor Maurizio Romanelli had demanded a 14-year sentence for the 35-year-old Ahmed, arguing that he had ties to a terror cell whose reach extended throughout Europe and even to Iraq. He had sought a seven-year sentence for Ragheh, Ahmed's alleged disciple, and contended the younger man was preparing to become a suicide bomber.

In comments to the court shortly before the verdict, Ahmed denied that he belonged to an Egyptian radical Islamic group. Ragheh said he came to Italy to look for work and was not involved in terror activities.

Defense lawyers for both men said they planned to appeal the ruling.

"There was no proof of terrorist association in Milan," said Luca D'Auria, a defense attorney for Ahmed. "There was none, and there is none."

D'Auria contended that the ruling was "influenced by Madrid."

Ahmed is to go on trial in Spain early next year along with 28 other suspects in the Madrid bombings.

In his remarks to the court — his first in the trial, which started in January — Ahmed said that if the prosecutor's accusations that he belonged to a radical Islamic group were true, Egyptian authorities would not have allowed him to have a new passport when he made the request at a consulate in Spain in 2001.

"The prosecutor said I am a member of the Islamic Jihad. If this was true they would never have allowed me to depart from Alexandria airport," Ahmed said, speaking to the court through a translator.

The Egyptian Islamic Jihad is a small militant group that took part in the assassination of Egyptian President Anwar Sadat in 1981. According to an Italian investigative report, Ahmed was a member of the group.

Ahmed is one of the chief suspects in the Madrid commuter rail bombing, accused of helping plan the March 11, 2004 attacks, which killed 191 people.

Spanish authorities had tipped Italian investigators off to Ahmed's presence in Italy after the Madrid attacks, Romanelli said. Authorities subsequently bugged the apartment where Ahmed was living with Ragheh, and the two men were arrested in Milan in June 2004.

Italian prosecutors said they overheard Ahmed claiming involvement in the Madrid attacks, telling his co-defendant, "I'm the thread to Madrid, it's my work."

Despite Ahmed's claims, Spanish authorities have never identified him as one of the masterminds, although they do say he played a role and have charged him with conspiracy to commit murder.

The alleged ringleader of the Madrid attack, Sarhane Ben Abdelmajid Fakhet, and four other suspects died in an April 2004 explosion in an apartment outside Madrid, apparently committing suicide to avoid capture. A Spanish investigator testified in June that Ahmed had been seen at Fakhet's apartment in Madrid.

D'Auria has acknowledged that his client knew the members of the cell that carried out the attacks, but said he knew nothing of their plans, which the defense says emerged months after Ahmed had left Spain for France in February 2003. Ahmed moved on to Italy at the end of December 2003.

Ragheh's lawyer, Roberta Ligotti said her client was innocent, saying he reacted with horror when Ahmed showed her the video of Berg's murder. She said Ragheh's offering a place for Ahmed to live could not be construed as supporting terrorist activities.