The Duchess of Sussex received "disgusting and very real" threats while a working royal, the outgoing Metropolitan Police assistant commissioner has said.
Neil Basu said he would understand if Meghan had felt "under threat all the time".
People have been prosecuted over the threats, he told Channel 4 News.
Prince Harry, who moved to California with Meghan in 2020, said last year he did not feel safe when visiting the UK.
The couple have often spoken about the abuse they received before they left and how it affected their mental health. As early as 2016, after the couple went public with their relationship, Prince Harry issued a statement attacking social media trolls for targeting Meghan.
Neil Basu – the former head of counter-terrorism policing in England – was speaking to Channel 4 News in his final interview as assistant commissioner.
"If you'd seen the stuff that was written and you were receiving it, the kind of rhetoric that's online, if you don't know what I know, you would feel under threat all of the time," he said.
When asked if there had been genuine threats to Meghan from the far-right, he added: "Absolutely.
"We had teams investigating it. People have been prosecuted for those threats."
He said he had previously spoken publicly about the threat of "extreme right-wing terrorism", saying it was the "fastest growing" threat that he dealt with.
"When I started in counter-terrorism in 2015, it was about 6% of our total workload. When I left 15, 16 months ago, it was over 20% of our workload."
Mr Basu, who is Britain's most senior officer of colour, was also in charge of royal protection.
He became an officer at the Met in 1992 before rising through the ranks and has been outspoken about race and policing over the years.
He added: "I speak about race because I know something about race because I'm a 54-year-old mixed-race man."
Mr Basu also criticised the government during his interview, saying he found "some of the commentary coming out of the Home Office inexplicable".
He had been asked about comments by Home Secretary Suella Braverman saying that it was her "dream" to see asylum seekers removed to Rwanda under the government's policy.
"It is unbelievable to hear a succession of very powerful politicians who look like this talking in language that my father would have remembered from 1968. It's horrific."
In response to his comments, a Home Office spokesman said: "The Home Secretary expects forces to take a zero tolerance approach to racism within their workplace.
"But the Home Secretary is also very clear about the need to manage our borders effectively and have an asylum system that works for those in genuine need, as are the British people."
The Duke and Duchess of Sussex stepped down as senior members of the Royal Family in 2020 to carve out their own path in the US.
After leaving the Royal Family, Meghan gave an Oprah interview in which she revealed she felt suicidal while a serving royal.
We upset Royal dynamic just by existing – Meghan
White supremacists targeted Sussexes, court told
Harry and Meghan navigate a tricky return to duty
Harry: I want to break cycle of pain for my family
Palace taking Meghan race issues 'very seriously'
US winter storm will bring frostbite within minutes
Key findings from 6 January committee final report
N Korea sold arms to Russia's Wagner group, US says
‘If I get the first shot, I will kill you son’
Quiz of the Year: Reckon you're a 2022 news expert?
After an epic journey ends, what happens next?
Escaping Nile floods to a minefield
'Just jokes': How a comedian divided Chinese online. Video
Anxious Christmas for families of Indians held in Nigeria
What exactly is in the $1.7tr US spending bill?
An abandoned Irish town's Christmas mystery
The dark side of a children's classic
Asia's most beautiful train route?
The diseases soaring post-lockdown
© 2022 BBC. The BBC is not responsible for the content of external sites. Read about our approach to external linking.