JAKARTA - An Indonesian court jailed an Islamic extremist for seven and a half years Monday over an "evil" plot to bomb the Myanmar embassy to avenge the killing of Rohingya Muslims.

Achmad Taufiq is one of several men to have gone on trial over the May plot, which came amid anger in Muslim-majority Indonesia at persecution of the stateless Rohingya in mainly Buddhist Myanmar.

Police foiled the plan the night before it was due to take place when they arrested Taufiq in Jakarta carrying a backpack full of homemade bombs while riding a motorbike with another militant.

The 22-year-old plotted with other militants and helped assemble the pipe-bombs, according to his indictment.

Handing down the guilty verdict and sentence Monday, presiding judge Suprapto, who like many Indonesians goes by one name, told the South Jakarta District Court that Taufiq was part of "an evil conspiracy".

"His actions disturbed the peace of the community and went against the government&39;s efforts to combat terrorism," he added.

Taufiq shook his head and looked stressed as the verdict was read out. Prosecutors had recommended an eight-year sentence.

He was found guilty of possessing explosive materials, a charge under tough anti-terror laws that can carry the death penalty in the most serious cases.

According to his indictment, he was part of an extremist group called Negara Islam Indonesia (the Islamic State of Indonesia).

Prosecutors said the planned attack was aimed at putting pressure on the government in Myanmar to do more to stop attacks on the Rohingya.

There have been a string of attacks on minority Muslims in Myanmar since 2012, mostly in the Rohingya&39;s western home state of Rakhine. Hundreds have been killed and tens of thousands made homeless.

Sigit Indrajid, 23, confessed during his trial last month that he was the mastermind of the plot. He is due to be sentenced later this month.

Indonesia has been waging a campaign against Islamic extremists over the past decade since a string of attacks on Western targets, and has succeeded in dismantling the most dangerous networks.