Prince Andrew somehow saved himself choosing to have an out-of-court settlement with Virginia Giuffre, a royal commentator said.

On Tuesday, a legal filing confirmed that Prince Andrew and Giuffre agreed to settle things outside the court. Both parties reached the decision following the Duke of York's countless attempts in dismissing the case.

"Virginia Giuffre and Prince Andrew have reached an out of court settlement," David Boies, Giuffre's lawyer, said in a letter, as reported by NBC News. "The parties will file a stipulated dismissal upon Ms. Giuffre's receipt of the settlement (the sum of which is not being disclosed)."

Meanwhile, Prince Andrew would reportedly make a substantial donation to Giuffre's victims rights group as part of the settlement. His camp also made it clear he never intended to "malign her character."

A royal commentator recently insisted that the settlement is "least worst of many bad options" that could prevent a damaging aftereffect.

How Prince Andrew's Settlement Saved Him From Further Disgrace

In a new interview with Channel 4 News' Jackie Long, royal commentator Peter Hunt and historian Anna Whitelock explained why the settlement allowed the royal family escaped major damage to their reputation with Prince Andrew's move.

"They would be immensely relieved. They absolutely dreaded the prospect of Prince Andrew even doing an interview under record," he said. "The Newsnight interview, they regret it even more and dreaded even more the cross-check with him going to trial and they were utterly clear for the prospect of him taking the stand."

Although Prince Andrew reached a settlement with Giuffre, Hunt said it does not ameliorate or remove the damage that he has imposed on the monarchy.

READ ALSO: Kim Kardashian Breaking Up With Pete Davidson Amid Kanye West's Pleas? 'KUWTK' Star's True Feelings Revealed

Following the decision, a Buckingham Palace official declined to comment on the development, saying it is for the Duke of York and his legal team.

With that said, Prince Andrew would no longer appear in a trial that had been posing a threat to the royal family. Still, he said he regrets his association with Jeffrey Epstein before applauding Giuffre and other survivors' decision to stand for themselves.

To show his regret even more, the royal prince would reportedly support the fight against sex trafficking.

READ MORE: Tyrese Gibson's Mother Dead: Cause of Death Heartbreaking [REPORT]