A teenager from south Wales has been found guilty of plotting a terror attack in Cardiff.
The boy, from Rhondda Cynon Taff, who cannot be named, was arrested on the day of a Justin Bieber concert at the Principality Stadium on 30 June.
The 17-year-old has been found guilty of five terror-related charges at Birmingham Crown Court.
The trial heard he was found with a "martyrdom letter" when arrested, which revealed details of his planned attack.
The court heard the A-level student, who is white and British, had set up an Instagram account encouraging jihad and supporting al-Qaeda. Police found the password for the account was "truck attack".
One post read: "May Allah bring terrorism to Cardiff on 30th June."
Police also found he had conducted numerous online searches into how to carry out a vehicle ramming attack and how to stab and kill.
Other targets he researched included Cardiff Castle, the New Theatre, the Capitol shopping centre, the Central Library and Bridgend's McArthur Glen shopping outlet.
His internet history included searches for "Isis beheading video", "how to create a terror attack" and "what does getting shot feel like".
The court heard he also researched the murder of Fusilier Lee Rigby and information on how to steal a car. His mobile phone contained images of the truck attacks in Nice and Berlin.
When arrested, the boy was found with a gutting knife and a hammer in his school rucksack, and the "martyrdom letter" said he was a "soldier of the Islamic state" and "more attacks will follow".
He had also told police in an interview he had been talking to someone called "Al Baghdadi" online, who had told the boy he would go to hell as he did not believe in Islam.
But his defence barrister Delroy Henry argued he was not planning an attack but had a "stupid interest in the gory".
The boy told the jury he wanted to see how easy it was to research terror-related topics online.
The boy was found guilty of one charge of engaging in the preparation of a terrorist act, two charges of encouraging terrorism, and a further two charges of possessing terrorist information.
Sentencing will take place on 10 January.
Sue Hemming, from the Crown Prosecution Service, said: "This teenager's behaviour over many months leaves no doubt that he intended to kill and maim as many people as possible in an attack reminiscent of the incident on Westminster Bridge.
"He was also posting extremist content online that could have encouraged others to commit terrorist acts and downloading instructions on how to carry out 'lone wolf' attacks.
"He will now rightly face the prospect of a substantial prison sentence."
Det Supt Lee Porter, of Wales Extremism Counter Terrorism Unit, said the investigation "prevented further offences being committed" and warned the public to be "vigilant".
He added: "This case has highlighted the ongoing concerns with young people gaining access to extremist material on the internet and how quickly that can lead to radicalisation."