Donald Trump returned briefly to the campaign trail on Wednesday and called the judge presiding over his hush money trial “crooked” a day after he was held in contempt of court and threatened with jail for violating a gag order.

Mr Trump’s remarks at events in the battleground states of Wisconsin and Michigan were being closely watched after he received a 9,000 dollar (£7,206) fine for making public statements about people connected to the criminal case.

In imposing the fine for posts on Mr Trump’s Truth Social account and campaign website, Judge Juan M Merchan said that if Mr Trump continued to violate his orders, he would “impose an incarceratory punishment”.

“There is no crime. I have a crooked judge, he’s a totally conflicted judge,” Mr Trump said speaking to supporters at an event in Waukesha, Wisconsin, claiming again that this and other cases against him are led by the White House to undermine his campaign.

The gag order bars him from making public statements about witnesses, jurors and some others connected to his hush money case. Mr Trump is still free to criticise Judge Merchan.

The former president is trying to achieve a balancing act unprecedented in American history by running for a second term as the presumptive Republican nominee while also fighting felony charges in New York.

Mr Trump frequently goes after Judge Merchan, prosecutors and potential witnesses at his rallies and on social media, attack lines that play well with his supporters but that have potentially put him in further legal jeopardy.

Election 2024 Trump
Donald Trump gestures after speaking at a campaign rally on Wednesday at the Waukesha County Expo Center in Wisconsin (Morry Gash/AP)

Mr Trump insists he is merely exercising his free speech rights, but the offending posts from his Truth Social account and campaign website were taken down. Judge Merchan is weighing other alleged gag-order violations and will hear arguments on Thursday.

Mr Trump has often called this case and other criminal cases against him “election interference”, saying they keep him from campaigning for the presidential election in November.

Supporters agreed he is being unfairly prosecuted, contending the trial and gag order were designed to distract him.

“It’s a trial looking for a crime,” said Ray Hanson, of Hartford. Mr Hanson said he expected Mr Trump’s lawyers would “keep him in line” so he does not violate the gag order, as much as he likely wants to talk about the trial.

Election 2024 Trump
Supporters stand for the National Anthem before Republican presidential candidate former President Donald Trump appears at a campaign rally in Waukesha, Wisconsin (Morry Gash/AP)

Manhattan prosecutors have argued Mr Trump and his associates took part in an illegal scheme to influence the 2016 presidential campaign by purchasing and then burying negative stories. He has pleaded not guilty.

Mr Trump’s visits to Wisconsin and Michigan mark his second trip to the swing states in just a month. For the previous rallies, the former president largely focused on immigration, referring to people who are in the US illegally and who are suspected of crimes as “animals”.

Meanwhile, Democrats are hoping to remind voters ahead of these visits about Mr Trump’s position on abortion, which Mr Trump has been openly concerned about being a political liability for him and Republicans.

Democratic Governor Gretchen Whitmer of Michigan met on Wednesday half a dozen women, including a family doctor, and warned that a second Trump term would threaten abortion rights even in her state, which enshrined those rights in its state constitution after the Supreme Court overturned national rights to the procedure.

Ms Whitmer appeared with the women at a book shop in Flint surrounded by signs that read “Stop Trump’s Attacks on Health Care” and “Stop Trump’s Abortion Ban”.

She told reporters not to believe Mr Trump’s contention in a Time Magazine interview that Republicans would never have enough votes in the US Senate to pass a national abortion ban.

“We cannot trust anything that Donald Trump says when it comes to abortion. So no one should take any comfort in the fact that, yes, he wants an abortion ban, but he won’t get it because he doesn’t think we’ll have 60 votes in the Senate. Baloney,” she said. “No one would have imagined we’d be here in this moment.”

Election 2024 Trump
Donald Trump shakes hands with a man dressed as Uncle Sam at the campaign rally (Morry Gash/AP)

Wisconsin and Michigan are among a handful of battleground states expected to decide the 2024 election.

For Mr Trump to win both states, he must do well in suburban areas such as the areas outside Milwaukee and Saginaw, Michigan, where he will hold Wednesday’s events. He underperformed in suburban areas during this year’s primary even as he dominated the Republican field overall.

Mr Trump has repeatedly falsely said that the 2020 election was stolen from him. His losses in battleground states in 2020 have withstood recounts, audits and reviews by the Justice Department and outside observers.