An Indonesian court on Tuesday sentenced a Muslim militant to 10 years in prison for involvement in last year's bombing of the J.W. Marriott hotel, but acquitted him of helping plan the 2002 Bali attacks (search) even though he acknowledged participating in the plot.

The August 2003 attack on the Marriott Hotel in Jakarta (search ) killed 12 people, while the bombing of nightclubs on the island of Bali killed 202.

Even though Jhoni Hendrawan, alias Idris (search ), admitted taking part in both attacks, the court ruled that he could not be prosecuted over the Bali case because the country's top court last month prohibited the retroactive application of the anti-terror law used to charge him. The law, however, was applicable in the Marriott case.

The anti-terror law was rushed through parliament after the Bali attacks. The Constitutional Court ruled that the law could not could not be used for crimes committed before its enactment. The Marriott blast occurred after the anti-terror law was passed.

Hendrawan was sentenced to 10 years for providing the chemicals for the bomb in the hotel attack. Prosecutors had accused Hendrawan of playing a role in the Bali blasts, including attending planning meetings and helping survey the two nightclubs targeted in the attacks.

In earlier court sessions, Hendrawan said he took part in both attacks, which he said were aimed at America and "its henchmen who oppress Islam." Prosecutors had demanded he serve 10 years.

Lawyers for the 32 militants already sentenced in the Bali attacks have said they would appeal the verdicts based on the top court's ruling. But Indonesia's justice minister insists that the decision does not affect convictions already handed down.

At least 10 people have been convicted in the Marriott attack and sentenced from three to 10 years.

Also Tuesday, prosecutors at a separate terror trial demanded that another militant accused in the Marriott blast — a 23-year-old Indonesian identified as Ismail — be sentenced to 12 years.

Prosecutors accuse Ismail of helping construct the bomb and survey the hotel before the attack. A verdict in that trial is expected by next month.