WASHINGTON – Federal prosecutors in New York concluded their investigation of hush-money payments Donald Trump's former personal lawyer orchestrated to quiet potential sex scandals in the final months of his presidential campaign, a judge said Wednesday.

The notice, contained in a brief order issued Wednesday by U.S. District Judge William Pauley, was an unceremonious end to an inquiry that implicated the president.

Trump's former lawyer, Michael Cohen, said he engineered payments to two women who claimed to have had extramarital affairs with Trump to silence them before the 2016 presidential election. Prosecutors in New York said those payments violated federal campaign finance laws, and they and Cohen said Trump directed his lawyer to arrange the payments.

Pauley revealed the end of the investigation as part of an order in which he instructed the government to make public some of the search warrants it used when investigating Cohen, who pleaded guilty to two campaign finance violations for the payments, as well as a set of other felonies. He is serving a three-year prison sentence.

“We are pleased that the investigations surrounding these ridiculous campaign finance allegations is now closed,” Trump attorney Jay Sekulow said Wednesday. “We have maintained from the outset that the president never engaged in any campaign finance violation.”

Between the New York inquiry and the special counsel investigation of Russian election interference, which concluded in March, Trump has spent nearly all of his presidency under scrutiny from federal prosecutors. Now that the campaign finance inquiry is closed, Sekulow said he knew of no other federal investigations in which Trump is a subject.

Pauley's announcement signals the end of a criminal investigation in which authorities examined Trump and his private business, the Trump Organization. Typically, prosecutors do not announce the end of an investigation or agree to provide details about their work if they intend to pursue additional charges.

One of Cohen's lawyers, Lanny Davis, reacted with dismay. "Why is Michael Cohen ... the only member of the Trump company to be prosecuted and imprisoned?" he said. "Especially since prosecutors found that virtually all of Michael’s admitted crimes were done at the direction of and for the benefit of Donald Trump? Why?”

The Justice Department declined to comment.

Prosecutors had asked to keep documents under seal, indicating that the investigation into the campaign finance violations was ongoing. Pauley said they changed that position in a sealed filing Monday, and as a result, the search warrant materials should become public.

“The campaign finance violations discussed in the Materials are a matter of national importance. Now that the Government’s investigation into those violations has concluded, it is time that every American has an opportunity to scrutinize the Materials,” Pauley wrote.

More:'I am not protecting Mr. Trump anymore.' Michael Cohen ties the president to ongoing criminal inquiries

More:From Trump fixer to Mueller informant: Timeline of Michael Cohen's role in Russia investigation

Pauley ordered the government to make the information public Thursday morning.

Cohen and federal prosecutors said he arranged payments to two women in the final months of Trump's 2016 campaign: Playboy Playmate Karen McDougal and pornographic actress Stormy Daniels.

Trump denied the affairs and said he did not know about the payments.

Prosecutors said in a court filing Cohen participated in an agreement involving a tabloid to “suppress” McDougal’s story and “prevent it from influencing the election.” The agreement involved “Corporation-1,” which agreed in August 2016 to buy McDougal’s story for $150,000. The description of "Corporation-1" matches public description of the National Enquirer

The Enquirer's parent company acknowledged in an agreement with prosecutors that it made the payment because McDougal's story could have jeopardized Trump's campaign.

Cohen arranged a separate payment – spending $130,000 out of his own pocket – to Daniels, who claimed to have had a sexual relationship with Trump in 2006. Prosecutors said Trump’s business reimbursed Cohen for his payment to Daniels, added $130,000 to pay for Cohen’s taxes and $60,000 as a bonus. Prosecutors said the payments were disguised as legal bills.

More:Trump faces uphill battle to keep financial records from Congress after lawyers clash in appeals court

Cohen said during congressional testimony in February that his former boss masterminded the “cover-up” of the payments to Daniels and directed him to lie about them, including to first lady Melania Trump. He presented the House Oversight and Government Reform Committee with a copy of a personal check that he said Trump signed during the first year of his presidency to reimburse him for the payments. Cohen said the check, which was for $35,000, was one of 11 installments.

Cohen said the other checks were signed by Donald Trump Jr. and Allen Weisselberg, the Trump Organization's finance chief.

During an FBI raid in April 2018, investigators sought bank records and other information on payments to Daniels and McDougal. Court records revealed that the investigation went far beyond the hush-money payments and that the FBI had been looking broadly into financial crimes by Cohen.

Cohen's statements to Congress led to a congressional investigation of Trump's finances. The oversight committee sought to obtain copies of Trump's financial records in its investigation on whether Trump incorrectly reported his finances in government disclosure forms, whether he has undisclosed conflicts of interest and whether he complied with the emoluments clause, which prohibits a president from receiving payments from foreign governments.

Cohen, who had vowed to "take a bullet" for Trump, called his former boss a "racist," a "con man" and a "cheat."

"I have done bad things, but I am not a bad man. I have fixed things, but I am no longer your fixer, Mr. Trump," Cohen said.

The president castigated Cohen, saying he was lying to reduce his prison time.

Contributing: Brad Heath and Bart Jansen