"His girlfriend Meghan Markle has been subject to a wave of abuse and harassment. Some of this has been very public -- the smear on the front page of a national newspaper; the racial undertones of comment pieces; and the outright sexism and racism of social media trolls and web article comments," read the statement, which was issued by Prince Harry's communications secretary through the palace Twitter account.

"Some of it has been hidden from the public -- the nightly legal battles to keep defamatory stories out of the papers; her mother having to struggle past photographers to get to her front door."

The warning put an end to weeks of media speculation over whether the two were in a relationship.

The palace statement said Markle, who lives in Toronto where her TV series "Suits" is filmed, has had photographers try to break into her home and that her ex-boyfriend had been offered "substantial bribes" by various newspapers."Prince Harry is worried about Ms. Markle's safety and is deeply disappointed that he has not been able to protect her," the statement read.

The prince asked for his statement to be issued so that the press behind the story could "pause and reflect before any further damage is done."

A royal obsession?

The British media -- which regularly covers the personal lives of the royal family -- has reported heavily on the relationship, in particular Markle's heritage. Her mother is African American and her father is Caucasian.

The Daily Mail headlined a story "Harry's girl is (almost) straight outta Compton," in which it reported that Markle's mother lives in a "run-down area" in Crenshaw, Los Angeles.

The Sun described Markle as a "brunette" and a "break from the mould for Prince Harry, who has previously dated a string of blondes."

The palace rarely puts out such statements, but did release a similar one in 2015 to ward off paparazzi taking photos of Prince George and Princess Charlotte, the children of the Duke and Duchess of Cambridge, Prince William and Kate Middleton.