A far-right politician in southwest Stockholm has been slapped with 40 days in prison over insult on Islam and Muslims on social media, local media reported on Wednesday.

The politician in Sodertalje city from the far-right Swedish Democrats Party, which is known for its anti-migrant stance, had shared a Facebook post that read “All Muslims are terrorists,”, according to the Expo newspaper.

A case was filed against the politician, whose name was not provided, on the grounds that he committed a hate crime through the post.

The court decided to convert the prison sentence to a fine of 2,000 krona ($223). The decision was approved by the High Court.