A teenage man who was reported to British anti-terror authorities by his mother was jailed for life on Friday. Matthew King, 19, will serve a minimum term of six years for plotting a terror attack on police officers or soldiers.

In what was the first terror sentencing in England and Wales to be televised, the judge praised King's mother for taking her suspicions to the Prevent counter-terror program.

"She took the very bold step of alerting Prevent when she had concerns for her son," Judge Mark Lucraft said during sentencing at the Old Bailey, the central criminal court in central London. "That cannot have been an easy thing to do in the first place, and in my view she absolutely did the right thing."

UNDERAGE ISIS TERRORIST PLANNED BOMB ATTACK IN NORTHERN ITALY, AUTHORITIES ALLEGE

In January, King pleaded guilty to the preparation of terror acts between Dec. 22, 2021 and May 17, 2022.

Matthew King

Matthew King, an ISIS-sympathetic British teenager who planned an attack on the Commonwealth's Army, has been sentenced to life in prison and must serve at least six years before becoming eligible for release. (Metropolitan Police/PA via AP)

King, who was radicalized online during the coronavirus pandemic, had expressed a desire to kill military personnel as he prepared to stake out a British Army barracks in east London. He also expressed a desire to travel to Syria to join so-called Islamic State.

VIRGINIA TERRORISM SUSPECT REPORTEDLY MARRIED TO 'EMPRESS OF ISIS'

His desires were thwarted when his mother reported him. Authorities were also tipped off through an anti-terror hotline after he posted a video on a WhatsApp group in April 2022.

The judge found that King was a dangerous offender who carried a risk of future harm to the public, despite claims by his lawyer that the defendant was on the path to deradicalization.

"It is clear that you are someone who developed an entrenched Islamist extremist mindset, extreme anti-Western views and that you intended to commit terrorist acts both in the U.K. and overseas," the judge said.

CLICK HERE TO GET THE FOX NEWS APP

King could be out in five years. He has already spent 367 days in prison, which will be taken into account and deducted from the length of time he has to serve.