A spokesperson for President Trump has said that he “will continue to hold the Fake News accountable through this powerhouse lawsuit against the New York Times,” the newspaper reported, and added that his legal team will file an amended version to meet the judge’s directions.

In its own statement, the New York Times said it welcome’s the judge’s “quick ruling, which recognised that the complaint was a political document rather than a serious legal filing”.

The paper had said earlier this week that the lawsuit has “no merit.”

“It lacks any legitimate legal claims and instead is an attempt to stifle and discourage independent reporting,” the newspaper said in a statement earlier this week.

In his order on Friday, Judge Merryday said the lawsuit filed by Trump is “repetitive” and “superfluous”, and contains “florid” allegations.

The 85-page lawsuit was filed in federal court in Tampa earlier this week. It also names Penguin Random House LLC – the publisher of a book written by Times reporters last year – and accuses the newspaper of serving as a “mouthpiece” for Democrats.

Judge Merryday wrote in his ruling that even if Trump’s allegations were proven to be true, and even if the lawsuit were interpreted in a “generous and lenient” manner, the way it was written violates the rules of the court and is “decidedly improper and impermissible.”

Neither President Trump nor his lawyers have yet responded to Judge Merryday’s decision.

The lawsuit comes as the Trump administration has faced criticism for what opponents call a crackdown on media unfavourable to the president.

On Thursday, the US president suggested some TV networks should have their broadcast licenses “taken away,” after ABC suspended late-night TV host Jimmy Kimmel only hours following threats from the Trump administration.

Kimmel’s suspension came after he made comments about the Charlie Kirk murder suspect, saying Trump supporters had tried to “characterise this kid (the suspect) as anything other than one of them.”

Other late-night TV hosts backed the comic, with Stephen Colbert calling the removal of Kimmel “blatant censorship”.