LONDON (Reuters) - A British teenager was found guilty on Monday of planning to drive a car into a crowd in the Welsh capital Cardiff, with a Justin Bieber concert and a shopping center among the list of possible targets for his Islamic State-inspired attack.

The 17-year-old boy, who cannot be named for legal reasons, wrote a “martyrdom letter” in which he said he was “a soldier of the Islamic State”.

Police found the letter in a rucksack in his bedroom which also contained a large knife and a hammer.

The Crown Prosecution Service (CPS) said he was planning an attack of a similar type to one near Britain’s parliament in March, where a man in a van drove into pedestrians on London’s Westminster Bridge before stabbing a policeman.

“This teenager’s behavior 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,” said Sue Hemming, head of the special crime and counter terrorism division at the CPS.

“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.”

The Westminster attack was one of five major attacks this year that British authorities are treating as terrorism incidents. Five people including the policeman and the attacker, Khalid Masood, died in the Westminster incident.

The CPS said the Welsh schoolboy had posted Islamic State propaganda on his Instagram account, and his Instagram password was “Truck Attack”. He researched possible targets including Cardiff Castle, a theater, a library and a shopping center, as well as the Bieber gig, which took place in June.

The teenager admitted that he owned the knife and hammer and had written the letter, but denied intending to harm anyone.

He will be sentenced in January.