Ofcom has fined an international broadcasting network £200,000 after it aired a clip produced by Muhammad Riyad before he launched an attack on train passengers in Germany.

The watchdog said Ariana Television and Radio Network – a service that broadcasts to the Afghan community – showed a two-minute clip of the 17-year-old brandishing a knife.

According to a translation of Riyad’s monologue, which he gave in Pashto, he declared himself a member of “Islamic State” and said: “I will slaughter you in your homes.”

Riyad later launched his attack on the train in Wuerzburg, injuring five people with an axe and a knife.

Ofcom headquarters in London.Ofcom headquarters in London (Yui Mok/PA)

The news item also included footage of the interior of a railway carriage covered in bloodstains and bloodstained pieces of paper.

After an investigation, Ofcom concluded the company had breached parts of the Broadcasting Code by showing “material likely to encourage or incite the commission of crime, and hate speech”.

It said in a statement: “Under the Broadcasting Code, licensees must not broadcast material likely to encourage or to incite the commission of crime, or to lead to disorder. Also, they must not broadcast material which contains uncontextualised hate speech.”

It added that the Ariana network is expected to pay the hefty fine to HM Paymaster General and must air a statement of the findings on a date, and in a form, determined by Ofcom.