The Justice Department asked US District Judge Rodney Smith to unseal the records after the Republican-controlled Congress requiring the Attorney General to release all unclassified files related to its investigations of Epstein and his associate Ghislaine Maxwell, who is in prison for sex trafficking.
Trump, who said he ended his friendship with Epstein long before the financier's 2019 arrest, had opposed the release of the files but reversed course shortly before politicians voted on the bill, which he signed on November 19.
The files are eagerly sought by both Trump's political opponents and members of his own base who have pressed for greater transparency in the case.
Many Trump voters believe his administration has covered up Epstein's ties to powerful figures and obscured details surrounding his death, which was ruled a suicide, in a Manhattan jail in 2019 as he faced federal sex trafficking charges.
The scandal has been a thorn in Trump's side for months, partly because he amplified conspiracy theories about Epstein to his own supporters before winning re-election in 2024.
Friday's court ruling dealt with the earliest known federal inquiry.
In 2005, police in Palm Beach, Florida, where Epstein had a mansion, began interviewing teenage girls who told of being hired to give the financier sexualised massages.
The FBI later joined the investigation.
Prosecutors in Florida prepared an indictment in 2007, but Epstein's lawyers attacked the credibility of his accusers publicly while secretly negotiating a plea bargain that would let him avoid serious jail time.
In 2008, Epstein pleaded guilty to relatively minor state charges of soliciting prostitution from someone under age 18.
He served most of his 18-month sentence in a work release program that let him spend his days in his office.
The lawyer in Miami at the time, Alex Acosta, agreed not to prosecute Epstein on federal charges - a decision that outraged Epstein's accusers.
After the Miami Herald re-examined the unusual plea bargain in a series of stories in 2018, public outrage over Epstein's light sentence led to Acosta's resignation as Trump's labour secretary.
A Justice Department report in 2020 found that Acosta exercised "poor judgment" in handling the investigation, but it also said he did not engage in professional misconduct.
A different federal prosecutor, in New York, brought a sex trafficking indictment against Epstein in 2019, mirroring some of the same allegations involving under-age girls that had been the subject of the aborted investigation.
Epstein's longtime confidant and ex-girlfriend, Maxwell, was then tried on similar charges, convicted and sentenced in 2022 to 20 years in prison.
The Justice Department has separate requests pending for the release of grand jury records related to the sex trafficking cases against Epstein and Maxwell in New York.
The judges in those matters have said they plan to rule expeditiously.
with PA
------------
1800 RESPECT (1800 737 732)
National Sexual Abuse and Redress Support Service 1800 211 028