Prince Andrew and his long-time accuser Virginia Giuffre have settled a sexual assault lawsuit for an undisclosed sum, a US court filing showed on February 15, sparing the disgraced British royal the public humiliation of a trial.

In a letter sent to a New York judge on behalf of both parties, Giuffre’s lawyer David Boies wrote that they “have reached an out of court settlement”, without revealing the financial terms.

As part of the agreement, the British royal will make a “substantial donation” to a charity established by Giuffre that supports sex trafficking victims, Boies said.

Giuffre has said she had sex with Andrew when she was 17, a minor under US law, after meeting him through the late US financier Jeffrey Epstein, who committed suicide in prison while awaiting trial for sex crimes.

The prince has not been criminally charged and has denied the allegations.

The settlement means the civil case will not go to a jury trial. It also means Andrew, 61, will no longer be questioned under oath by Giuffre’s lawyers, who had been due to travel to London next month.

Boies said in the document filed in a Manhattan court that the respective parties would file a stipulation dismissing the case within 30 days upon “receipt of the settlement”.

The letter makes no mention of Giuffre’s accusations. Neither does it admit any guilt on behalf of Andrew or refer to the repeated denials he has made.

It said that Andrew “regrets his association with Epstein and commends the bravery of Ms Giuffre and other survivors in standing up for themselves and others”.

“Prince Andrew has never intended to malign Ms Giuffre’s character, and he accepts that she has suffered both as an established victim of abuse and as a result of unfair public attacks.

“He pledges to demonstrate his regret for his association with Epstein by supporting the fight against the evils of sex trafficking, and by supporting its victims,” the letter added.

The controversy has embarrassed the British monarchy and overshadowed Queen Elizabeth II’s Platinum Jubilee year in which she marks 70 years on the throne.

Last month, Andrew was stripped of his honourary military titles and charitable roles after US judge Lewis Kaplan denied his plea to dismiss Giuffre’s case.

Former prosecutor-turned law professor Bennett Gershman said the settlement was “very good news” for Andrew because it gets him out of testifying while not having to acknowledge any improper conduct towards Giuffre.

“His relief must be palpable,” Gershman said.

Lawyer Lisa Bloom, who represents eight of Epstein’s victims, hailed the settlement as a “victory” for Giuffre, however.

“She has accomplished what no one else could: getting Prince Andrew to stop his nonsense and side with sexual abuse victims,” Bloom tweeted.

Giuffre, now 38, alleged that Andrew sexually assaulted her at the London home of socialite and Epstein friend Ghislaine Maxwell after a night out dancing in March 2001.

She sued the prince last year for unspecified damages under New York’s Child Victims’ Act, alleging that she was trafficked to him by Epstein and Maxwell.