The Duke of York and his accuser Virginia Giuffre have reached an out-of-court settlement in the civil sex claim filed in the US.
In a letter submitted to the United States District Court on Tuesday, Ms Giuffre's lawyer David Boies wrote jointly with Andrew's lawyers to say that the parties had "reached a settlement in principle".
Court documents show the Duke will make a "substantial donation to Ms Giuffre's charity in support of victims' rights".
Andrew has also pledged to "demonstrate his regret for his association" with convicted paedophile Jeffrey Epstein by supporting the "fight against the evils of sex trafficking, and by supporting its victims."
Under the settlement, Andrew has agreed to pay Giuffre an unspecified sum - and she will withdraw her lawsuit accusing the royal of sexual abuse when she was 17 and still a minor under US laws.
The prince has always denied the allegations and had sought to have the lawsuit thrown out prior to today's agreement, which does not constitute an admission of guilt from the duke.
An attachment to the letter announcing the settlement gave brief details of the agreement between Andrew and Ms Giuffre but indicated the sum would not be disclosed.
The document submitted to the court said: "Virginia Giuffre and Prince Andrew have reached an out of court settlement.
"The parties will file a stipulated dismissal upon Ms Giuffre's receipt of the settlement (the sum of which is not being disclosed).
"Prince Andrew intends to make a substantial donation to Ms. Giuffre's charity in support of victims' rights.
"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.
"It is known that Jeffrey Epstein trafficked countless young girls over many years.
"Prince Andrew regrets his association with Epstein, and commends the bravery of Ms Giuffre and other survivors in standing up for themselves and others.
"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."
Representatives for the Duke of York said he would not be expanding beyond the statement filed in court.
They also declined to comment on how the substantial donation to Ms Giuffre's charity would be funded.
When asked for comment by the PA news agency, Virginia Giuffre's lawyer David Boies said: "I believe this event speaks for itself."
Buckingham Palace declined to comment.
Lawyer Lisa Bloom, who represents eight victims of Jeffrey Epstein, welcomed the settlement as a "victory" for Virginia Giuffre.
She wrote on Twitter: "My statement on behalf of the 8 Jeffrey Epstein victims I represent:
"We hail Virginia's victory today. She has accomplished what no one else could: getting Prince Andrew to stop his nonsense and side with sexual abuse victims. We salute Virginia's stunning courage."
Don't miss the latest news from around Scotland and beyond - Sign up to our daily newsletter here .