Donald Trump and his press secretary were directly involved in discussions that led to an illegal hush-money payment to Stormy Daniels during the 2016 election campaign, according to the FBI.

A court filing unsealed on Thursday said Trump and Hope Hicks spoke repeatedly with Michael Cohen, Trump’s longterm legal fixer, in October 2016 as Daniels – also known as Stephanie Clifford – threatened to sell her story of an affair with Trump.

“I believe that at least some of these communications concerned the need to prevent Clifford from going public,” an FBI agent wrote, in an application for a search warrant.

Cohen later admitted to making payments totalling $280,000 through a shell company to buy the silence of Daniels and the former Playboy model Karen McDougal, who also alleged she had an affair with Trump.

The new disclosures raise the possibility that Hicks lied to the FBI. Hicks told an agent in an interview that “she did not learn about the allegations made by Clifford until early November 2016”, the new filings said. Hicks, who is now a senior executive at Rupert Murdoch’s Fox Corporation, has denied wrongdoing.

The filings were released at the federal court in Manhattan, where Cohen pleaded guilty last year to campaign finance and personal financial crimes. Cohen began a three-year sentence in federal prison in May this year.

I believe that at least some of these communications concerned the need to prevent Clifford from going public FBI agent

They said Trump and Hicks had a four-minute call with Cohen on the evening of 8 October 2016, a day after the leak of an NBC recording of Trump boasting that he grabbed women by their genitals, as an effort to silence Daniels apparently began.

Cohen had not spoken with Hicks for weeks beforehand and typically only had a call with Trump about once a month, according to the agent, who said Cohen and Hicks “spoke again for about two minutes” soon after the call with Trump.

Following the calls with Trump and Hicks, Cohen embarked on a flurry of calls and texts with executives at American Media, the publisher of the National Enquirer, which later admitted helping Trump cover up hush-money payments.

Numerous additional text messages, calls and frantic discussions between Cohen and others about the payoff to Daniels were detailed in the filings. Cohen “spoke to Trump for approximately five minutes” on 28 October, the day the payment was finalised, according to the FBI.

The filings were unsealed after Judge William Pauley disclosed on Wednesday that federal investigators had ended their inquiry into Trump’s hush-money payments to two women who alleged they had extramarital affairs with him.

Prosecutors therefore appear to have decided against bringing criminal charges against executives from the Trump Organization for involvement in the payoffs. Cohen was repaid with checks signed by Trump and his eldest son, Donald Jr.

Redacted versions of the search warrant documents were made public by federal prosecutors in March this year. They showed that Mueller persuaded a judge within weeks of being made special counsel in 2017 that Cohen may have been secretly working for a foreign government. Ultimately no charges were brought on that.

The Department of Justice had tried to continue redacting the names of people who were not charged, but was ordered on Wednesday to reveal the information by Pauley.

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

When he pleaded guilty, Cohen said he had acted “in coordination with” Trump as part of an attempt to stop allegations being aired that could damage Trump’s presidential campaign in its final weeks.

In a statement on Wednesday, Cohen’s attorney Lanny Davis expressed astonishment that the case had been closed without charges against others involved, “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.”