MIAMI — The suicide of Jeffrey E. Epstein in a New York jail last month has rendered moot the attempts by his victims to invalidate a 12-year-old agreement not to prosecute him on federal charges in connection with a wide-ranging sex trafficking investigation, a federal judge ruled on Monday.

Judge Kenneth A. Marra of the Federal District Court in West Palm Beach, Fla., had ruled this year that prosecutors had violated the law when they failed to tell victims about the 2007 agreement not to prosecute Mr. Epstein, raising the possibility that the agreement could be nullified and that the victims could finally get their day in court. The case continued even after Mr. Epstein was arrested in July on new sex trafficking charges filed in New York.

But Mr. Epstein’s death has removed the basis for the victims’ request to rescind the non-prosecution agreement that has been the subject of so much legal and political scrutiny over the past year, Judge Marra ruled on Monday. In a blow to the victims, the judge also said he could not invalidate the agreement’s protections of any of Mr. Epstein’s potential co-conspirators, theoretically leaving the door open for those people to claim in the future that they are immune from federal prosecution.

However, in a separate filing in the case unsealed on Monday, the federal government told the court in 2011 that the agreement applied only in Florida, not to any charges that might be filed in another state.