A German court on Friday sentenced a right-wing extremist to a nine year and eight month prison sentence for bombing a mosque in Dresden nearly two years ago.

Nino K. was convicted of attempted murder, producing an explosive device and attempted arson, among other charges.

Read more: Chemnitz, Saxony and Germany grapple with far right

On September 26, 2016, the former member of the anti-Islam Pegida movement detonated a pipe bomb at the Turkish Fatih Mosque in the eastern German city.

No one was hurt. However, the imam and his family were in their home within the mosque complex at the time of the blast. Later that evening, Nino K. detonated another bomb on the roof of the Dresden Congress Center.

The bombings caused widespread worry about far-right violence against Muslims at a time hundreds of thousands of refugees were arriving in Germany.

Read more: Germany sees almost 1,000 anti-Muslim crimes in 2017

The 31-year-old confessed to both crimes and expressed regret for his actions before Friday's verdict.

Nino K. had appeared at Pegida demonstrations in Dresden. Around a year before the attacks he had held a speech from the stage of a Dresden demonstration condemning Chancellor Angela Merkel for "treason against the people."

Prosecutors had demanded a 10 year and nine month sentence, while the defense requested a lighter four year and six month sentence.

cw/kms (AFP, epd)