Bonn's central train station
The device failed to explode after a technical fault Google

A court in Germany has sentenced an Islamist militant who planned on bombing a railway in the western city of Bonn.

Marco Gäbel, 29, a German citizen, planted a home-made pipe bomb in a sports bag at the main train station of Bonn in December 2012.

The bomb caused chaos across Bonn and sparked a city-wide manhunt.

According to investigators the device only failed to go off because of a technical defect.

Gäbel and the three others were also found guilty of forming a terrorist organisation and of plotting to shoot dead the leader of anti-immigrant group Pro-NRW in North Rhine-Westphalia state in March 2013.

The militants had targeted the Pro-NRW politicians after they staged anti-Islamic protests and displayed caricatures of the Prophet Mohammed outside a local mosque.

Two of the other defendants, Turkish-German Koray Durmaz, 28 and Albanian Enea Buzo, 46 received prison terms of 12 years while German Tayfun Sevim, 27, was given a nine-and-a-half-year jail term.

Prosecutors argued that shortly after the failed bomb attempt, Gäbel founded a domestic terror organization that was inspired by an audio recording of an Islamist movement in Uzbekistan.

The assassination attempt in Leverkusen was foiled by police who had been monitoring the defendants for some time.

Defence lawyers for the men argued that there was insufficient evidence to convict them and had pursued an acquittal.

Judge Frank Schreiber handed down the sentences in a high-security courtroom in the western city of Düsseldorf after a two-and-a-half-year trial which included testimony from 27 experts and 157 witnesses.