Husnain Rashid, of Nelson, Lancashire, had maintained his innocence throughout proceedings at Woolwich Crown Court, but on Thursday unexpectedly admitted a string of terror offences.
The 32-year-old admitted to using a Telegram chat group to call on supporters to target the four-year-old heir to the throne on October 13, who had started at Thomas’s Battersea, in south-west London, a month earlier.
He also posted suggestions of which British football stadiums terrorists could strike, following the deadly attack outside Besiktas’s ground in Turkey, his trial previously heard.
Judge Andrew Lees told the defendant: “For the past week I have listened to the most disturbing allegations.
“You have admitted these allegations of encouraging others to commit terrorist activities and publishing statements to encourage the killing of others.
“It is inevitable that you will receive a very lengthy prison sentence and there will be a consideration of a life prison sentence.
“The question of your future dangerousness and the protection of the public is a matter that I will have to give very careful consideration.”
Prosecutors said Rashid was encouraging terrorism by posting a photograph of the prince at the school super-imposed with silhouettes of two masked jihad fighters.
But nearly two weeks into his trial, the defendant was re-indicted and pleaded guilty to three counts of engaging in conduct in preparation of terrorist acts and one count of encouraging terrorism.
The charges covered offences spanning from October 2016 to April this year.
He was arrested at his home in November.
Two charges of dissemination of a terrorist publication and one of failing to comply with a notice under the Regulation of Investigatory Powers Act will lay on file.
Rashid will be sentenced at Woolwich Crown Court on June 28, Judge Lees said.