The BBC has apologised for failing to warn the Duke of Sussex that it would be broadcasting and publishing online an image of him in which he was branded "a race traitor", which was shared on a neo-Nazi social media group.
The image showed Harry with a pistol to his head against a blood-spattered background and also featured a blood-smeared swastika.
It was shared on a far-right social media platform in August last year, just a few months after the duke married mixed race former actress Meghan Markle.
The BBC featured the image in a broadcast and on its website, which subsequently led to the prosecution of two far-right teenagers.
Watchdog Ofcom rejected a complaint from Harry about the use of the image, but has offered an apology to the senior royal.
A BBC source said: "This was an important piece of journalism which led to the arrest, conviction and imprisonment of two members of a neo-Nazi group.
"The image of The Duke of Sussex was included to show the abhorrent nature of their behaviour and Ofcom has subsequently concluded that there was a clear editorial rationale for using the image which, in the context of the news report, was considered unlikely to incite crime.
"Naturally we regret the distress caused and we apologised for failing to warn Kensington Palace in advance that it was to be published."
After the report, university student Michal Szewczuk, of Wyther Park in Bramley, Leeds – who created the image which included the phrase "See Ya Later Race Traitor", was ordered to be detained in a young offenders' institution after pleading guilty to two counts of encouraging terrorism and five counts of possession of terrorist material, including the White Resistance Manual and the Al Qaeda Trading Manual.
Szewczuk, 19, was sentenced at the Old Bailey alongside 18-year-old Oskar Dunn-Koczorowski, from St Albans Avenue in west London, who had admitted two counts of encouraging terrorism.
Rejecting the complaint in July, Ofcom said showing the image was editorially justified.
The judgment said: "When broadcasting or publishing examples of racist propaganda in content with a clear public interest, there are nevertheless limits on the type of material which can be included, taking into account generally accepted standards in particular.
"The BBC demonstrated in this case that it made a finely balanced decision on the necessary editorial justification to include the image and removed it from the article two days after publication when it considered that the public interest in the story had reduced."
A spokeswoman for Harry said he welcomes the letter of apology from the BBC, but added: "His Royal Highness maintains that instead of reproducing the image and giving a platform to something that would have only been seen by a few, it should have just been described so that others would not potentially be influenced by such an inflammatory image."