A German court has ordered a 15-year-old boy to do community work and write an essay titled Why You Shouldn't Make Jokes With Toy Weapons after he threw a fake hand grenade in front of a teacher and shouted "Allahu akbar".

The teenager, a Moroccan citizen, had been charged with disturbing the peace by threatening crimes. Dusseldorf district court spokesman Marcel Due said a judge dropped the charges on condition that he do 20 hours' community work and hand in the three-page, handwritten essay.

Mr Due said the boy admitted the incident in May was meant as a prank and denied having any Islamic extremist motivation. He told the court he found the fake grenade lying in the schoolyard.

Sign up to our free newsletters

Get the best updates straight to your inbox:
Please select at least one mailing list.

You can unsubscribe at any time by clicking the link in the footer of our emails. We use Mailchimp as our marketing platform. By subscribing, you acknowledge that your information will be transferred to Mailchimp for processing.