Image copyright Karwai Tang

The Duchess of Sussex has revealed text messages she and Prince Harry sent to her father before their wedding, as part of legal action against the publisher of the Mail on Sunday.

Meghan claims Associated Newspapers misquoted the messages to paint the couple in a less good light.

She also claims tabloids, in particular those owned by the group, caused a dispute between her and her father.

Associated Newspapers says it will defend the privacy claim "with vigour".

It comes as Meghan and Harry, who have relocated to California after stepping back as senior royals, told the UK's tabloid press that they are ending all co-operation with them.

Meghan brought the legal action after a handwritten letter she sent to her father, Thomas Markle, was published in the Mail on Sunday.

She claims the letter was selectively edited by the paper to portray her "negatively".

Court papers containing the text messages have been filed ahead of an expected hearing later this week.

The legal document claims they show the newspaper group edited the messages the Duke and Duchess of Sussex sent to Mr Markle before their wedding on 19 May 2018.

'Meg and I are not angry'

It said that on 5 May 2018 Meghan wrote in a text to her father: "I've called and texted but haven't heard back from you so hoping you're okay".

She then messaged her father the next day after finding out photographs of her father had been staged for a paparazzo photographer, the document said.

"She explains that she had attempted to arrange logistics and supplies for her father discretely and with privacy, with care taken not to feed the press, that she is trying to protect her father from heightened press intrusion and scrutiny and that he should keep a low profile until the wedding," it says.

On 14 May 2018, it says, Mr Markle sent Meghan a text message to apologise and confirm that he would not be attending the wedding.

It says that around half an hour later, after several calls to Mr Markle went unanswered, Prince Harry sent the following messages to Mr Markle from Meghan's phone:

"Tom, it's Harry and I'm going to call you right now. Please pick up, thank you"

"Tom, Harry again! Really need to speak to u. U do not need to apologize, we understand the circumstances but "going public" will only make the situation worse. If u love Meg and want to make it right please call me as there are two other options which don't involve u having to speak to the media, who incidentally created this whole situation. So please call me so I can explain. Meg and I are not angry, we just need to speak to u. Thanks"

"Oh any speaking to the press WILL backfire, trust me Tom. Only we can help u, as we have been trying from day 1".

The legal document claimed the newspaper's summary of these messages contained "significant omissions" when it "merely" reported that the messages said "Mr Markle did not need to apologise and that he should call".

It adds the description of another exchange "intentionally omits" any reference to Meghan or Prince Harry attempting to protect Mr Markle and ensure that he was safe.

Image copyright Getty Images Image caption The duke and duchess married at Windsor in May 2018

The document also states that the UK tabloid media, particularly Associated Newspapers, harassed, humiliated and manipulated Mr Markle.

Meghan alleges the newspaper group caused the very "dispute" which they claim justified the publication of the letter and also caused "substantial damage" to their relationship.

She accuses the paper of misusing her private information, breaching copyright and selective editing when it published the private letter to her father.

Image copyright Getty Images

The Mail on Sunday has said there was "huge and legitimate" public interest in publishing the letter.

The paper argues that members of the Royal Family, including the Duchess of Sussex, "rely on publicity about themselves and their lives in order to maintain the privileged positions they hold and promote themselves".

It claims Meghan "did not have a reasonable expectation of privacy that the contents of the letter were private and would remain so".

As evidence that it did not infringe her privacy, the paper said the letter was "immaculately copied" in Meghan's "elaborate handwriting", arguing that this care in its presentation meant she anticipated it would be seen and read by a wider audience.