A far-right teenager who plotted to attack a mosque while disguised as an armed police officer has been jailed.
Joe Metcalfe was aged 15 when he planned a murderous assault on the mosque in Keighley, West Yorkshire.
He was sentenced to 10 years for terror offences and rape at Leeds Crown Court.
Judge Bobbie Cheema-Grubb KC told Metcalfe he was at "high risk of posing serious harm to others through sexual behaviour and future acts of terror".
An order that previously banned the reporting of Metcalfe's name because of his age was lifted at the hearing.
The court heard that Metcalfe, who lived with his parents in Haworth, Bradford, was referred to the North East Counter Terrorism Prevent team in 2021 after his school raised concerns about his behaviour.
He had sessions with a anti-terrorism support worker but the court was told that Metcalfe, who is now 17, lied to the worker and continued to share videos relating to acts of terrorism and wrote a "manifesto".
He also "idolised" convicted international terrorists such as Brenton Tarrant, who filmed himself as he shot 51 people in two mosques in New Zealand in 2019.
The court heard Metcalfe conducted a scouting trip on a mosque in Keighley after stealing his father's Lexus car on 5 June 2022, as part of a "written plan" for a terror attack.
He then crashed the car into a fence, which led to his arrest on 21 June 2022.
The Crown Prosecution Service (CPS) said he had contacted a gun seller outside the UK with the aim of having a weapon illicitly shipped to him.
Barrister Peter Moulson KC, defending Metcalfe, said his client had no previous convictions but had a "lack of maturity".
Judge Cheema-Grubb KC told Metcalfe that a jury had found that he "genuinely intended to carry out an act of terrorism".
She said: "There would certainly have been some injury caused. You had the means and you planned it carefully.
"You are stuck in a racist and extremist mindset. You are a dangerous young offender."
The court heard Metcalfe told a probation officer he had recently converted to Islam and that he had said: "I'm really sorry about what I have done, I'm no longer a threat to anyone."
But Judge Cheema-Grubb said: "Although everyone has the potential to change I am not convinced there is any yet."
Nick Price, head of the Crown Prosecution Service's Special Crime and Counter Terrorism Division, said Metcalfe's plans were "not idle fantasies".
"Despite his young age his beliefs and willingness to take violent action to propagate them are a threat to our society," he said.
West Yorkshire Police's Ch Supt Richard Padwell said he appreciated the case would "understandably cause concern, particularly within our local Muslim communities".
He said the force would "act on any intelligence that indicates a potential threat to our communities".
Metcalfe was also convicted of multiple charges of rape and coercive controlling behaviour.
He was jailed for 10 years and will serve a further six years on licence.