A federal US judge sanctioned former president Donald Trump and his lawyers nearly $1m for a “frivolous” lawsuit claiming Hillary Clinton had tried to rig the 2016 election.

District Judge John Middlebrooks said Trump, a Republican who is seeking to return to the White House in 2024,

exhibited a “continuing pattern of misuse of the courts” and had filed the suit “in order to dishonestly advance a political narrative”.

Trump sued Clinton, the 2016 Democratic presidential nominee, claiming that she and other Democrats sought to rig that election by falsely accusing his campaign of links to Russia.

Clinton lost to Trump. Middlebrooks, who was appointed to the bench by President Bill Clinton in 1997, dismissed the case in September,

calling the lawsuit “a two-hundred-page political manifesto outlining his grievances against those that have opposed him”. Trump had sought $70m in damages.

But the suit “should never have been brought”, Middlebrooks said in the 45-page written court order released Thursday evening.