LONDON — Meghan, Duchess of Sussex, won her High Court privacy case against the Mail on Sunday after a judge ruled that the tabloid had invaded her privacy by publishing a letter the former American actress wrote to her estranged father.

It’s a major legal victory for the duchess, the wife of Britain’s Prince Harry, Duke of Sussex. She sued the Associated Newspapers, the owner of the Mail on Sunday and the MailOnline, for invasion of privacy and copyright infringement following articles published in 2019 that featured segments of a five-page letter she had written to her father, Thomas Markle.

The duchess said that she was “grateful to the courts for holding Associated Newspapers and The Mail on Sunday to account for their illegal and dehumanizing practices.”

In an emailed statement, she added: “For these outlets, it’s a game. For me and so many others, it’s real life, real relationships, and very real sadness. The damage they have done and continue to do runs deep.”

Mark Warby, the High Court judge, said that the duchess “had a reasonable expectation that the contents of the letter would remain private. The Mail articles interfered with that reasonable expectation.”

In his judgment, Warby also wrote: “It was a communication between family members with a single addressee. Precautions were taken to ensure that it was delivered only to him. It was, in short, a personal and private letter. The majority of what was published was about the claimant’s own behaviour, her feelings of anguish about her father’s behaviour — as she saw it — and the resulting rift.”

The judge found that publishing the letter infringed the duchess’s copyright, but said that the issue of whether the duchess was the “sole author” of the letter should be determined at trial. He said that there will be a hearing in early March to determine the next steps in the case.

In the handwritten letter that the duchess wrote, after her wedding on May 19, 2018, she pleaded with her father to stop talking to the media, saying, “your actions have broken my heart into a million pieces.” The British tabloid quoted from the letter and also printed images of the duchess’s elaborate handwritten script.

Associated Newspapers had defended their coverage, saying that the contents of the letter weren’t private as alleged and that Thomas Markle had a “weighty right” to tell his version of events to set the record straight.

A spokeswoman for the Mail on Sunday told The Washington Post: “We are very surprised by today’s summary judgment and disappointed at being denied the chance to have all the evidence heard and tested in open court at a full trial.

“We are carefully considering the judgment’s contents and will decide in due course whether to lodge an appeal.”

Since stepping down as senior royals, Prince Harry and his wife have not backed away from taking legal action against media outlets. He recently won a printed apology and “substantial damages” from Associated Newspapers following two articles, in the Mail on Sunday and MailOnline, over claims he had “turned his back” on the armed forces.

Last year, representatives for the royal couple sent a letter to the editors of the four British tabloids saying that they will not “offer themselves up as currency for an economy of click bait and distortion.”