A court in Essen handed three teenagers long juvenile sentences of up to seven years on Tuesday for their role in a bomb attack on a Sikh temple last spring, a court spokesman said.

The judge ruled that the teens should serve sentences of seven years, six years and nine months and six years in a juvenile detention center.

The two defendants who detonated the bomb were convicted of attempted murder, among other charges. The third teen was found guilty of conspiracy to murder since he was not at the crime scene.

The entrance of the temple was destroyed and three people were injured in the explosion

The defendants Yusuf T., Mohamed B. and Tolga I. were aged 16 years when they detonated a homemade explosive device outside the temple. All three boys were born in Germany.

A priest suffered serious burns due to the blast, which took place after a wedding party on April 16, 2016. Two other people were also injured by shards of glass.

Packed fire extinguisher

The bomb, crafted from a fire extinguisher packed with explosive chemicals, also destroyed the entrance to the temple.

Prosecutors said the three defendants carried out the bomb attack because they consider Sikhs to be "non-believers." They also targeted the center over alleged mistreatment of Muslims by Sikhs in northern India.

In their indictment, prosecutors also said the teens were radicalized via social media networks in 2015.

The defendants denied any religious motives in the attack.

Around 200 members of the Sikh community live in Essen, in the western German state of North Rhine-Westphalia.

rs/jm (AFP, dpa)