Image copyright Getty Images Image caption The Daily Mail published allegations Mrs Trump "provided services beyond simply modelling"

The UK's Daily Mail newspaper has agreed to pay damages and costs to the first lady of the United States over an article about her modelling career.

The newspaper had reported allegations that Melania Trump once worked as an escort, but later retracted the claims.

The story was published during the US election campaign last year.

Mrs Trump accepted damages and an apology from the newspaper at London's High Court.

The article was published by the Daily Mail newspaper, and subsequently the paper's digital operation Mail Online.

In a statement, Mrs Trump's lawyer said that she is "very pleased" and "will remain vigilant to protect her good name and reputation from those who make false and defamatory statements about her".

Mrs Trump filed a lawsuit against the Daily Mail in the UK, and filed against Mail Online in the US.

The payout settles the case both in New York and the UK, despite London's High Court having no jurisdiction in the US.

The US suit, filed last year, sought damages of $150m (£120m). The amount accepted by Mrs Trump in London was not disclosed in court.

However, reports suggest the payout was closer to $3m, including legal costs and damages.

In its apology, the Daily Mail acknowledged it had published "allegations that she provided services beyond simply modelling".

The article also claimed that Mr and Mrs Trump may have met three years before they actually did, and later "staged" their first meeting.

"We accept that these allegations about Mrs Trump are not true," the newspaper said.

A lawyer for Mrs Trump told the London court the allegations "strike at the heart of the claimant's personal integrity and dignity".

Image copyright White House Image caption Mrs Trump had her official portrait as first lady taken earlier in April

Her lawyer said the double-page spread in August last year, titled "Racy photos and troubling questions about his wife's past that could derail Trump", featured an old nude photo of Mrs Trump from her modelling career.

"Readers of the newspaper that day could not fail to miss the article," he said.

Analysis: Amol Rajan, BBC Media Editor

And so the mighty Mail titles have been Trumped.

Well, almost. There are people in the legal profession flabbergasted at the size of the damages that Melania Trump has received from Associated Newspapers.

But given some of the figures bandied about when this case first arose, that isn't as bad as some at the Mail group may have feared.

Moreover, the Mail are pointing out that they stick by some aspects of their original story, but accept error on the most salacious: that the First Lady was an escort.

It will be interesting to see if this settlement encourages others to be more aggressive toward UK papers, and also whether it helps to spread the trend for legal action across multiple jurisdictions.

Charles Harder, Mrs Trump's lawyer, also acted for Hulk Hogan when the wrestler brought his $140m (£112m) case against Gawker Media, forcing its sale.

Compared to that, this action is small fry.

Mrs Trump's lawsuit initially said that Mrs Trump had the "unique, once-in-a-lifetime opportunity... to launch a broad-based commercial brand in multiple product categories, each of which could have garnered multi-million dollar business relationships for a multi-year term during which [she] is one of the most photographed women in the world".

Critics used the phrasing to question whether Mrs Trump had plans to make financial gains from her position as first lady.

A second version of the suit, re-filed weeks later, dropped the controversial wording.

Mrs Trump was born Melanija Knavs, in Sevnica, a small town about an hour's drive from Slovenia's capital of Ljubljana.

She was signed to a modelling agency in her late teens, and began flying around Europe and the US, appearing in high-profile ad campaigns.

She met Donald Trump in 1998, when she was 28 years old, at a party during New York Fashion week.

They married seven years later.

Media playback is unsupported on your device Media caption What was Melania Trump like in Slovenia?

Sign-up to get news from the BBC in your inbox, each weekday morning