Teenage neo-Nazis who incited terror attacks on targets including Prince Harry have been jailed.

Michal Szewczuk and Oskar Dunn-Koczorowski were members of a group calling itself Sonnenkrieg Division, described as the “third generation” of banned terrorist group National Action.

After setting up online accounts for the faction last year, the pair shared a series of propaganda posters featuring swastikas and the Nazi “black sun” symbol alongside their own logo.

One poster showed Prince Harry having a gun pointed at his head with blood splatters and the caption: “See ya later, race traitor.”

The image was shared online in August last year, just a few months after he married mixed race former actress Meghan Markle.

The far right in the UK Show all 10 1 /10 The far right in the UK The far right in the UK British Union Jack flags are reflected in the sunglasses of a protester during a protest on April 1, 2017 in London Chris J Ratcliffe/Getty Images The far right in the UK A man holds a St George's Cross flag at a demonstration organised by the far-right group the English Defence League in central London on June 24, 2017 Tolga Akmen/AFP The far right in the UK A man is pictured with police officers at a demonstration organised by the far-right group the English Defence League (EDL) in central London on June 24, 2017 Tolga Akmen/AFP The far right in the UK A Neo-Nazi chats amicably with a police officer at a demonstration organised by the far-right group the English Defence League in central London Tolga Akmen/AFP The far right in the UK Supporters of the far-right group Britain First wave flags as they march and rally in central London on April 1, 2017 following the March 22 terrorist attack on the British parliament Daniel Leal-Olivas/AFP The far right in the UK Police walk ahead of supporters of the far-right group Britain First marching in central London on April 1, 2017 Daniel Leal-Olivas/AFP The far right in the UK Protesters hold placards and British Union Jack flags during a protest titled 'London march against terrorism' on April 1, 2017 in London Chris J Ratcliffe/Getty Images The far right in the UK A woman wearing a Donald Trump campaign hat hugs another woman during a protest titled 'London march against terrorism' on April 1, 2017 Chris J Ratcliffe/Getty Images The far right in the UK A protester waves a British Union Jack with an 'England' tattoo on his arm during a protest on April 1, 2017 in London Chris J Ratcliffe/Getty Images The far right in the UK Anti-Semitic demonstrators attend a rally on Whitehall in central London on July 4, 2015 Jack Taylor/AFP

Sentencing Szewczuk and Dunn-Koczorowski at the Old Bailey, judge Rebecca Poulet QC said the image “advances violence”.

“It is not just something that is deeply unpalatable. It encourages terrorism,” she added.

“Individuals were urged to go out and commit appalling acts of violence on others for no reason that can ever be understood by any right-thinking individuals.”

Szewczuk, of Wyther Park in Leeds, was jailed for four years and three months, and Dunn-Koczorowski, of St Albans Avenue in west London, was sentenced to an 18-month detention and training order. The defendants appeared in court via video link from Belmarsh prison and gave no reaction as they were sentenced.

Prosecutor Naomi Parsons told the court that the posts, which were shared across three accounts by the two teenagers, “convey a message of the threat of and use of serious violence against others, in order to advance a political, ideological and racial cause (neo-Nazism) and in this way encourage terrorism”.

She said targets included Jewish people, non-white people and anyone “perceived to be complicit in the perpetuation of multiculturalism”.

A Sonnenkrieg Division poster shared on the social network Gab (Counter Terrorism Policing North East)

The pair, who had only interacted online before their arrest, shared Sonnenkrieg Division propaganda under pseudonyms on the “free speech” social network Gab and gaming forums, while Szewczuk also authored his own violent blog. He sipped water and gave no reaction in the dock as quotes justifying the rape of women and children to further an Aryan race were read aloud to the court on Monday.

A Sonnenkrieg Divison poster also called for people to “rape the cops”, with an image showing a man in a scull mask grabbing a female officer, and another showed a white woman being hanged and read: “Race mixing whores get the f***ing rope.”

Others praised Anders Breivik, the terrorist who massacred 77 people in 2011 attacks targeting Norway’s government and Labour Party.

Some posters were written in Russian, including one threatening the ethnic cleansing of Albanians.

They were posted from a now-deleted Sonnenkrieg Division account on Gab, which has become a haven for the international far right and hosts openly neo-Nazi, racist, antisemitic and violent content.

The posters displayed a link to a website containing writings by James Mason, a prominent American neo-Nazi who authored a book containing violent racism and antisemitism, and tactics for a coming “race war”.

Mason is linked to the American paramilitary neo-Nazi group Atomwaffen Division, which has been responsible for several murders in the US, and its supporters spread Sonnenkrieg Division propaganda online.

Szewczuk, a 19-year-old Polish national from Leeds, was arrested in December while studying computer science at Portsmouth University. Dunn-Koczorowski, 18, worked as a labourer for a construction company and was arrested at his west London home on the same day.

A Sonnenkrieg Division poster shared on the social network Gab, reading ‘Free Breivik‘ in Norwegian (Counter Terrorism Policing North East)

A police search discovered flags of the Atomwaffen Division and Iron March fascist forum, as well as a phone with a screen saver of a hooded man holding the “black sun”.

The pair admitted encouraging terrorism, while Szewczuk also pleaded guilty to five counts of possessing terrorist documents including the White Resistance Manual, The Anarchist Cookbook, an al-Qaeda manual and Isis supporters’ guide to obtaining weapons, making bombs and hiding from security services.

Detective chief superintendent Martin Snowden said: “Dunn-Koczorowski and Szewczuk clearly see themselves as superior to the majority of society and they feel their duty is to express their beliefs, in turn teaching others.

“The considerable amount of material they have posted on social media channels not only reflects their extremist beliefs but was intended to encourage others to carry out despicable acts. Both men have developed and evolved their interest in the extreme right-wing ideology over time through research and connecting with like-minded individuals.”

The officer, who is head of Counter Terrorism Policing North East, appealed for the public to report material that glorifies terrorism, and pleaded to “tackle all forms of toxic extremism which has the potential to threaten public safety and security”.

Both men are reported to have been members of neo-Nazi group the System Resistance Network (SRN), and Dunn-Koczorowski was part of National Action before it was banned as a terrorist organisation in 2016. The prohibition caused the group to split into regional factions that operated under new names in an attempt to evade the law.

National Action: Neo-Nazi terrorist couple who named baby ‘Adolf’ jailed

A report by counterextremism group Hope Not Hate said Sonnenkrieg Division was spawned by a “split over strategy and ideology” in SRN, making it the “third generation” of National Action. Sonnenkrieg Division’s alleged leader, who is currently under investigation by police, was said to have been expelled from SRN with other members who were “obsessed by Satanism”.

“The Sonnenkrieg Division has produced some of the most frightening and sickening material seen on the British far right for decades, including open interest in Satanism and the promotion of paedophilia, rape and murder,” Hope Not Hate researchers said. “Sodomy was also a disturbing and repetitive theme … members of the Sonnenkrieg Division openly celebrate and encourage sexual violence.”

The court heard a doctor’s report described Dunn-Koczorowski as an “emotionally and psychologically damaged young man” who has a “lack of remorse” for his views and a “deeply entrenched ideology”.

In mitigation for Szewczuk, lawyer Adam Morgan said his client had a “difficult and disordered upbringing” and had suffered with depression “for a considerable period”. The court heard he moved to the UK from Poland aged 10, living first in Northern Ireland and then England.

The sentencing came days after new figures showed that the proportion of white terror suspects being arrested in the UK is at the highest level for 15 years.