London, UK CNN  — 

A British ISIS supporter, who called for jihadis to attack 4-year-old Prince George, pleaded guilty to terrorism offenses Thursday, two weeks into his trial at a court in London.

In a dramatic U-turn at Woolwich Crown Court, 32-year-old Husnain Rashid admitted he had carried out a string of terror offenses, including engaging in conduct in preparation for terrorist acts and encouraging terrorism. He had maintained his innocence since his arrest in November 2017.

Rashid wrote messages online encouraging militants to carry out attacks, including posting a picture of Prince George – son of the Duke and Duchess of Cambridge and third in line to the throne – next to a superimposed silhouette of a jihadi fighter, the Crown Prosecution Service (CPS) said.

He also gave the full address of the young prince’s school in southwest London, which the boy began attending last September, and wrote: “even the royal family will not be left alone.”

Prince George arrives for his first day of school with his father Prince William on September 7.

All of the offenses relate to Rashid’s online activities between October 2016 and November 2017, the CPS said. He will be sentenced on June 28.

During that time, Rashid also encouraged attacks on a number of other targets including soccer stadiums, British Army bases, shopping centers and Jewish communities, and suggested injecting poison into supermarket ice creams, Britain’s Press Association reported.

Rashid had also made plans to travel to Turkey and Syria, intending to fight in territories controlled by ISIS, the CPS said, adding that he had sought advice on how to reach Syria and obtain the authorization he would need to join a fighting group.

An artist's sketch shows Husnain Rashid during his trial.

He had also provided information about how to shoot down aircraft and jam missile systems to an individual already in Syria, according to the CPS.

Following Rashid’s revised plea, Judge Andrew Lees said the trial had heard the “most disturbing allegations” and told Rashid a very lengthy prison sentence was “inevitable” and a life sentence would be considered, according to PA.