FILE - This March 28, 2017, file photo, provided by the New York State Sex Offender Registry shows Jeffrey Epstein.  A judge denied bail for jailed financier Jeffrey Epstein on sex trafficking charges Thursday, July 18, 2019, saying the danger to the community that would result if the jet-setting defendant was free formed the

NEW YORK (AP) — A judge who denied bail for jailed financier Jeffrey Epstein on sex trafficking charges Thursday said he poses a danger to the public and seems to still have an uncontrollable urge for sexual conduct with or in the presence of underage girls.

Epstein, 66, also might use his "great wealth and vast resources" to flee the country, U.S. District Judge Richard M. Berman said.

Epstein, his hands folded before him, showed no reaction when Berman announced his fate in the morning. Epstein's lawyers did not comment.

"I doubt that any bail package can overcome danger to the community," Berman said in court, citing a danger for both the "minor victims in this case and prospective victims as well."

Epstein has pleaded not guilty to sex trafficking charges.

In the written ruling released hours later, Berman cited the discovery in Epstein's mansion after his July 6 arrest of a trove of sexually suggestive photographs of nude underage and adult females.

"Mr. Epstein's alleged excessive attraction to sexual conduct with or in the presence of minor girls — which is said to include his soliciting and receiving massages from young girls and young women perhaps as many as four times a day — appears likely to be uncontrollable," Berman said.

"Accordingly, Mr. Epstein's past sexual conduct is not likely to have abated or been successfully suppressed by fierce determination, as his Defense Counsel suggests," he added.

Lawyers for Epstein had argued their client has stayed clean since pleading guilty to soliciting a minor for prostitution charges in Florida in 2008 in a deal that allowed him to avoid federal prosecution . They have argued that with the current charges, the federal government is reneging on that deal.

The decision means Epstein will remain behind bars while he fights charges that he exploited dozens of girls in New York and Florida in the early 2000s. He faces up to 45 years in prison if convicted.

In court, Berman noted the "compelling testimony" at Monday's bail hearing by Epstein accusers Annie Farmer and Courtney Wild, who "testified that they fear for their safety and the safety of others if Mr. Epstein were to be released."

Wild, who said she was sexually abused by Epstein when she was 14 in Palm Beach, Florida, pleaded with the judge to keep him jailed.

"He's a scary person to have walking the streets," Wild said during the Monday hearing.

The defense had argued 66-year-old Epstein should be allowed to await trial under house arrest with electronic monitoring at his $77 million Manhattan mansion. They said he wouldn't run and was willing to pledge a fortune of at least $559 million as collateral.

The judge said he also rejected bail because Epstein presents a flight risk, in part because of his opulent lifestyle that includes private jets, frequent international travel and a foreign residence in Paris.

Two politicians lauded Berman's bail decision, with Democrat U.S. Rep. Debbie Wasserman Schultz saying "survivors deserve more answers and true justice."

On Monday, Assistant U.S. Attorney Alex Rossmiller said the government's case against Epstein is "getting stronger every single day" as more women contact authorities to say he sexually abused them when they were minors.

Rossmiller said the government learned earlier this week that a raid of Epstein's mansion following his arrest turned up "piles of cash, dozens of diamonds" and a passport with a picture of the defendant but a name other than his in a locked safe.

In a court filing Wednesday, prosecutors disputed a claim by defense lawyers that there was no evidence he'd ever used the fake passport, saying the Austrian passport contained stamps reflecting it was used to enter France, Spain, Britain and Saudi Arabia in the 1980s.

Prior to Thursday's bail hearing, defense lawyers told the judge Epstein was given the passport by a friend after some Jewish-Americans were informally advised to carry identification bearing a non-Jewish name when traveling internationally during a period when hijackings were more common.

They said he never used it and the passport stamps predated his receipt of the document.

Prosecutors have also said they believe Epstein might have tried to influence witnesses after discovering he had paid a total of $350,000 to two people, including a former employee, in the last year. That came after the Miami Herald reported the circumstances of his state court conviction in 2008, which led to a 13-month jail term and the federal non-prosecution agreement.

Labor Secretary Alexander Acosta resigned last week after coming under renewed criticism for overseeing the decade-old arrangement as U.S. attorney in Miami.

In this courtroom sketch, defendant Jeffrey Epstein, second from right, listens along with defense attorneys, from left, Marc Fernich, Michael Miller, and Martin Weinberg as Judge Richard M. Berman denies him bail during a hearing in federal court, Thursday, July 18, 2019 in New York. Judge Berman denied bail for the jailed financier on sex trafficking charges, saying the danger to the community that would result if the jet-setting defendant was free formed the
In this courtroom sketch, Judge Richard M. Berman speaking as he denies Jeffrey Epstein bail during a hearing in federal court, Thursday, July 18, 2019 in New York. Judge Berman denied bail for the jailed financier on sex trafficking charges, saying the danger to the community that would result if the jet-setting defendant was free formed the
Geoffrey Berman, front, the United States Attorney for the Southern District of New York, leaves federal court in New York after a judge denied bail to Jeffrey Epstein, Thursday, July 18, 2019. (AP Photo/Mark Lennihan)
Martin Weinberg, a defense attorney for Jeffrey Epstein, leaves federal court in New York after a judge denied bail to his client, Thursday, July 18, 2019. (AP Photo/Mark Lennihan)
Stan Pottinger, an attorney representing some of alleged victims of Jeffery Epstein, speaks to reporters in front of a courthouse in New York, Thursday, July 18, 2019. A judge denied bail Thursday for jailed financier Jeffrey Epstein on sex trafficking charges after prosecutors argued the jet-setting defendant is a danger to the public and might flee the country. (AP Photo/Seth Wenig)
Sigrid McCawley, an attorney representing some of alleged victim of Jeffery Epstein, speaks to reporters in front of a courthouse in New York, Thursday, July 18, 2019. A judge denied bail Thursday for jailed financier Jeffrey Epstein on sex trafficking charges after prosecutors argued the jet-setting defendant is a danger to the public and might flee the country. (AP Photo/Seth Wenig)