An Ilford teenage extremist behind a campaign to promote jihad has pleaded guilty to three charges of terrorism.

The 17-year-old admitted creating flyers and CDs, featuring lectures by a banned hate-preacher, which were found in prayer rooms in two of London’s biggest hospitals.

At Westminster Magistrates’ Court today, the teenager, who cannot be identified because of his age, pleaded guilty to two charges of encouraging and assisting the commission of a terrorist offence between December 2016 and October last year.

He further admitted one count of providing a service to assist an act of terrorism.

At the hearing, Senior District Judge Emma Arbuthnot threatened to jail the teenager unless his family can prove that they are doing all they can to stop him reoffending.

She said: “This boy is nearly 18. This is a very serious offence. I’m going to need to know all I can about the family.

“If there’s no family stopping this from happening I’m going to lock him up, quite frankly.”

The defendant was tracked down when a carrier bag containing flyers titled “Go my Muslim brothers and fight for the mujahideen in Chechnya and become martyrs for the sake of Allah” was left on the Hammersmith and City line in April last year.

The owner of the bag was traced via CCTV and his travelcard to Royal London Hospital where a pile of CDs marked “Free. Take me” were found in a cupboard in the prayer and contemplation room.

The CDs were found to contain a series of lectures by banned hate preacher Anwar al-Awlaki.

Following an investigation to find the owner of the bag - a man aged in his 50s - a search was carried out at University College Hospital where further extremist material was found in the prayer room.

The link between the two men is unclear.

The teenager, who appeared at court with his parents, was linked to the flyers and CDs using DNA evidence and his home was raided on October 11 last year.

Police discovered a number of disks identical to those found at the hospitals, as well as the computer used to manufacture the flyers.

Adjourning sentencing until March 5, Judge Arbuthnot said to the defendant: “I need to work out what I’m going to do with your sentence.

“I have to make sure that if I don’t lock you up there’s a very robust package of measures in place. If you were over 18 I would lock you up, no problem.”

She praised his parents for attending court, saying: “It’s the most difficult thing for the parents because obviously they are very worried about the child and often this comes from nowhere.”

He has been granted bail on condition he live and sleep at his home address, surrenders his passport and reports to his local police station three times a week.