A 2009 settlement agreement between Jeffrey Epstein and longtime accuser Virginia Giuffre can be kept under seal as Britain’s Prince Andrew fights a lawsuit filed by the woman, a federal judge ruled Wednesday. 

Giuffre claims the royal sexually assaulted her when she was underage.

U.S. District Court Judge Lewis A. Kaplan handed down his decision just one day after the Duke of York’s attorney, Andrew Brettler, asked that the document remain sealed when he files arguments explaining why he thinks the judge should throw out the lawsuit. 

Brettler said he wanted to include a copy of the agreement with the arguments. He added that the agreement "releases Prince Andrew and others from any purported liability arising from the claims Ms. Giuffre asserted against Prince Andrew here."

Britain's Prince Andrew, Duke of York, attends the ceremonial funeral procession of Britain's Prince Philip, Duke of Edinburgh, to St George's Chapel in Windsor Castle in Windsor, west of London, on April 17, 2021. (CHRIS JACKSON/POOL/AFP via Getty Images)

PRINCE ANDREW SCANDAL: DUKE'S LAWYER ASKS TO KEEP VIRGINIA GIUFFRE, JEFFREY EPSTEIN SETTLEMENT UNDER SEAL

In his order, Kaplan noted that the Estate of Jeffrey Epstein does not contend that the settlement agreement must remain sealed.

Kaplan seemed to urge the parties to ask the judge in the other case — Loretta A. Preska — to agree that the document can be unsealed, saying Preska "might well view with favor an application ... to permit the public disclosure of the Settlement Agreement."

"But that is for her to say," Kaplan wrote, ruling that the agreement can be filed under seal and remain so unless Preska or Kaplan decide otherwise.

The agreement was reached between Giuffre and Epstein, a previously convicted financier who was found dead at age 66 in his cell in 2019 while awaiting a sex trafficking trial at a New York federal jail. 

PRINCE ANDREW CASE: JUDGE OVERSEEING GIUFFRE LAWSUIT SIGNALS OK FOR TRIAL, ORDERS DEPOSITIONS BY JULY 2022

Prince Andrew Virginia Roberts

Photo from 2001 that was included in court files shows Prince Andrew with his arm around the waist of 17-year-old Virginia Giuffre, who says Jeffrey Epstein paid her to have sex with the prince. Andrew has denied the charges. In the background is Epstein's girlfriend Ghislaine Maxwell. (Florida Southern District Court) (U.S. Second Circuit Court of Appeals)

In the August lawsuit, Giuffre accused the Duke of intentional infliction of emotional distress and battery. She claims in the suit that she was forced, under Epstein's orders, to have sex with Andrew three times. The lawsuit said the prince abused her on multiple occasions in 2001 when she was 17 and a minor under U.S. law.

A pretrial hearing in the case is scheduled for early November.

CLICK HERE TO GET THE FOX NEWS APP

Earlier this week, Kaplan ordered that depositions in the civil lawsuit filed by Virginia Roberts Giuffre against Prince Andrew must be completed by July 14 of next year, effectively signaling he is ready to move the case to trial, court records show.

Fox News' Marta Dhanis contributed to this report, as well as The Associated Press.