A British supporter of Islamic State who admitted to planning an attack on Prince George was on Friday jailed for life.

Husnain Rashid, of Nelson, in the northern English county of Lancashire, will spend a minimum of 25 years behind bars.

He dramatically changed his plea during trial and admitted a string of terror offences related to the plot to target the four-year-old heir to the throne.

Jurors at Woolwich Crown Court in London heard the 32-year-old used a Telegram chat group in October to call on supporters to attack George, the eldest son of Prince William and his wife Kate.

The young prince had started at a school in south-west London, a month earlier.

READ MORE Prince William begins first royal visit to Israel

Rashid posted a photograph of George at the school super-imposed with silhouettes of two masked jihad fighters.

"Even the royal family will not be left alone," he wrote in accompanying messages, adding: "School starts early."

Judge Andrew Lees, in sentencing him, said: "The message was clear -- you were providing the name and address of Prince George's school, an image of Prince George's school and the instruction or threat that Prince George and other members of the royal family should be viewed as potential targets."

He added: "You provided what you regarded as inspiration for suitable targets for lone wolf terror attacks."

Rashid admitted three counts of engaging in conduct in preparation of terrorist acts, and was given a life sentence for each, and one count of encouraging terrorism.

During the trial prosecutors suggested that Rashid planned to flee to Syria to fight for IS.

He also posted suggestions of which British football stadiums terrorists could strike following the deadly attack outside Besiktas's ground in Turkey, and plotted to inject ice cream with poison.