New York • A judge confirmed in a court filing Thursday that federal prosecutors in New York are still investigating campaign finance crimes committed when President Donald Trump’s former lawyer, Michael Cohen, paid two women to stay silent about alleged affairs with Trump.

U.S. District Judge William H. Pauley III made the disclosure as he agreed to release in several weeks some court documents related to the search warrant that authorized last April's FBI raids on Cohen's home and office. Media organizations had requested access to the records.

Pauley said some documents should stay secret because making them public could jeopardize ongoing investigations, "including those pertaining to or arising from Cohen's campaign finance crimes."

In December, Pauley sentenced Cohen to three years in prison for crimes including tax evasion, fraud, lying to congress and campaign finance violations that occurred when two women were paid to stay silent about affairs they claimed to have had with Trump.

Nine media organizations had cited high public interest and a right to access in requesting the records.

The judge gave prosecutors until the end of the month to identify portions of the documents that should stay secret.

Prosecutors through a spokesman declined comment.

In his decision, Pauley made revelations about the search warrants as he explained his reasoning on why only some search warrant materials can be released and only with redactions.

The judge said prosecutors had opposed the media requests, saying disclosure "would jeopardize an ongoing investigation and prejudice the privacy rights of uncharged third parties." He said they provided the search warrant materials for the judge to privately review.

He said the search warrant applications and affidavits supporting them "catalogue an assortment of uncharged individuals and detail their involvement in communications and transactions connected to the campaign finance charges to which Cohen pled guilty."

Cohen pleaded in August to two campaign violations and other crimes.

One charge described a $150,000 payment to former Playboy Playmate Karen McDougal and another concerned a $130,000 payment Cohen made to porn star Stormy Daniels using a sham home equity loan before he was reimbursed through the Trump Organization using false invoices, court papers said.

Cohen, in his plea, said that it was all done with the knowledge and at the direction of a "candidate for federal office" — meaning Trump. But whether Trump or anyone else involved with those transactions broke the law remained an open question.

News organizations in the legal action to unseal the documents included The New York Times, The Associated Press, and the parent companies of ABC and CBS News, CNN, the Daily News, the Wall Street Journal, Newsday and the New York Post.

David E. McCraw, vice president and deputy general counsel for The New York Times, said: "We are pleased that the court has rejected the Government's position that the public has no right to see these important and newsworthy materials. While we don't know how extensive the court-approved redactions will be, we are confident that the release of materials will shed light on the investigations involving Mr. Cohen."

Pauley called the public’s right to access the materials substantial and said the materials are “entitled to a strong presumption of public access.”