LONDON - A 15-year-old boy, thought to be the youngest Briton to be convicted of a terrorism offence, was given a life sentence on Friday for inciting an attack on a World War One commemorative event in Australia from his bedroom in northern England.

The boy, who cannot be named due to his age, pleaded guilty in July to sending messages online encouraging an attack on police officers at an event in April to mark Anzac Day - a day of remembrance for military dead in Australia and New Zealand. He was just 14 at the time.

The discovery of the boy's actions sparked a massive police operation in Melbourne, which led to the arrest of five teenagers who were planning an Islamic State-inspired attack on an event to mark the centenary of the Gallipoli landings, Australian authorities said.

British police said had the plot not been uncovered, it was likely someone would have been seriously injured or killed.

"From the early communication we could read, it was obvious the Anzac Day memorial service was going to be a target," said Detective Chief Superintendent Tony Mole of the North West Counter Terrorism Unit.

"People will be understandably be shocked by the age of the boy. However, this should not detract from the horror of what he was planning."

The boy from Blackburn, who had admitted a charge of inciting another person to commit an act of terrorism, was sentenced to life in a youth detention centre and will have to serve a minimum of five years.

Manchester Crown Court heard he was initially arrested by police on suspicion of making threats to kill his teacher. When detectives examined his phone they found extreme images, including a screen saver of Islamic State militants.

There was also evidence he had searched the internet for instructions on making explosives and building a detonator from scratch.

During nine days in March he shared more than 3,000 heavily encrypted messages with fellow plotter "Illyas" in Australia, in which they discussed a plan to run over a police officer at an Anzac Day parade.

The boy also suggested Illyas break into someone's house to "get your first taste of beheading" and they shared images, including an exact replica of a knife used in the "Rambo" films. The boy said it had a handle which is "perfect for tearing through throat".