DUESSELDORF, Germany (Reuters) - A court on Monday sentenced a German man to life in prison for an attempted bomb attack on a train station in 2012, attempted murder of the leader of a far-right anti-Muslim party and for founding a terrorist organization.

Marco G. shouted “Allahu Akbar!” (God is greatest) as he entered the courtroom.

Three others were convicted in the same case, a German, a German-Turkish citizen and an Albanian. They received prison sentences of between 9-1/2 years and 12 years for membership of the terrorist group and for the plan to kill Markus Beisicht, head of Pro NRW, a small far-right party in the western state of North Rhine-Westphalia.

“The court has sentenced the main suspect to life in prison for attempted murder, attempted explosives attack, the founding of and membership in a terrorist organization and the attempted murder of the head of ‘Pro NRW’,” said Peter Schuetz, spokesman for Duesseldorf’s higher regional court.

The court did not name the terrorist organization.

The court said in a statement that Marco G. had tried on Dec. 10, 2012 to detonate a homemade bomb hidden in a sports bag on a platform of Bonn’s central train station.

It said the bomb could have killed many people but never went off because its fragile detonator was damaged.

The court said Marco G. had, along with the three other defendants, planned several other attacks.

“The defendants are inhuman terrorists with an extremely high willingness to commit violence,” said Duscha Gmel, senior public prosecutor.

“The fact that nothing happened is not thanks to them. In the case of the Bonn bomb it was merely a lucky coincidence that no explosion with devastating consequences took place.”

The sentences could still be appealed at the federal supreme court.