A 15-year-old British boy has admitted encouraging an Islamic State-inspired terror attack targeting police officers at an Anzac Day parade in Australia.
Over a 10-day period, the youngster from Lancashire sent thousands of instant messages to 18-year-old Sevdet Besim, who shared his admiration for the Islamic terror group, the Old Bailey heard.
Police examined his mobile phone and uncovered the exchanges after he was arrested on April 2 in the Blackburn area.
In one message on March 18, the boy, who was 14 at the time, said: "Suggest you break into someone's house and get your first taste of beheading."
Besim replied that it seemed "a little risky".
The smartly-dressed, bespectacled British youngster pleaded guilty to inciting terrorism, via videolink from Manchester Crown Court.
The charge states that between March 15 and March 26 2015 he "incited a person to commit an act of terrorism wholly or partly outside the UK, namely the murder of police officers during an attack on a parade to commemorate Anzac Day in Australia".
A second charge of inciting terrorism overseas in relation to beheading a person in Australia was dropped by the prosecution.
Outlining the case, prosecutor Paul Greaney QC said: "The defendant has now pleaded guilty to what was count one on the indictment.
"This charge represents his conduct over 10 days in March 2015 in inciting an Australia-based man named Sevdet Besim to commit an act of terrorism abroad, namely the murder of police officers during an attack upon a parade to commemorate Anzac Day in Melbourne.
"The evidence of this plot derives from literally thousands of instant messages between the defendant and Sevdet Besim recovered from the defendant's mobile telephone.
"Those messages reveal the intentions of the plotters and their targets, along with their motivation which may be summarised as support for Isis and their enthusiasm for the attack.
"The messages also set out the plotters' preparations for the attack. On the 18th March 2015, as part of those preparations, the defendant sent Sevdet Besim a message that read, 'suggest you break into someone's house and get your first taste of beheading'.
"Sevdet Besim responded to say that this seemed 'a little risky' and that aspect of the preparations appears then to have drifted away."
This exchange was the subject of count two on the indictment but Mr Greaney said it had been deleted because the prosecution was happy to deal with it as "part and parcel" of the offence in count one.
Mr Justice Saunders ordered pre-sentence reports to find out if there was any "indoctrination" as he adjourned the case for sentencing at Manchester Crown Court on September 3.
He said: "I want some assessment of how and why it occurred and what measures could be taken in order to reverse that process.
"Dealing with someone of this age is an extremely difficult sentencing process and I will need all the help I can get."
The boy, who wore a grey shirt and tie, is being held in an unidentified youth detention centre in the North West of England.
Transcripts of Besim's alleged exchanges with the boy have emerged in Australian media reports.
According to the reports, the alleged plot was uncovered by secret surveillance of Besim - a friend of another teenager, Numan Haider, who was shot dead after being suspected of threatening Australian prime minister Tony Abbott.
Communications allegedly revealed Besim was planning to target police and intelligence officers with firearms and "a massive machete".
The boy urged him on and suggested videotaping the attack and sending it to an IS recruiter.
He wrote: "You are a lone wolf, a wolf that begs Allah for forgiveness a wolf that doesn't fear blame of the blamers. I'm (sic) I right?"
Besim allegedly replied: "Pretty much."
The boy also instructed Besim to "start dressing like a Kuffar", and asked if he was "willing for a bullet to go through you".
During another conversation days later, the British boy told Besim not to underestimate the "difficulty of beheading a person" and advised him: "U gotta be a lion especially that ur doing it in public."
The case comes in the wake of other foiled plots to carry out Lee Rigby-style killings.
Fusilier Rigby, a drummer and machine gunner with the 2nd Battalion Royal Regiment of Fusiliers, was killed outside his barracks in Woolwich, south-east London, in May 2013 by two Islamic extremists who were jailed for life last year at the Old Bailey.
Michael Adebolajo was given a whole-life sentence while his co-accused Michael Adebowale was jailed for life with a minimum term of 45 years.
In May this year, 19-year-old Kazi Islam was jailed for eight years for grooming a young man with learning difficulties to buy the ingredients for a pipe bomb and to attack one or more soldiers with a kitchen knife or meat cleaver on his command.
In March, Brusthom Ziamani, 19, was jailed for 22 years for hatching a plot to behead a British soldier also inspired by the murder of the 25-year-old soldier.
He was arrested in an east London street carrying a 12-inch knife and a hammer in a rucksack, having earlier researched the location of Army cadet bases in the south east of the capital.