A judge in Philadelphia held a brief hearing in the city prosecutor’s bid to shut down Elon Musk’s one million-US-dollar-a-day sweepstakes in battleground states.

The giveaways come from Mr Musk’s political organisation, which aims to boost Donald Trump’s presidential campaign.

Lawyers for Mr Musk filed a motion late on Wednesday seeking to move the case to federal court, saying it involves a federal election issue, but that did not stop a state judge, Angelo Foglietta, from holding the hearing at City Hall.

After taking comments from both sides, the judge put the state case on hold while Mr Musk tries to have it argued in federal court.

(PA Graphics)

Philadelphia District Attorney Larry Krasner hopes to argue there that the issues should be decided in state court.

Lawyers for Mr Krasner said Mr Musk and the America PAC “brazenly” continued the lottery every day this week, including on Thursday morning, despite Mr Krasner’s effort to shut it down.

The Democrat filed suit on Monday to stop the America PAC sweepstakes, which is set to run through Election Day, open to registered voters in battleground states who sign a petition supporting the Constitution.

Election law experts have raised questions about whether it violates federal law barring someone from paying others to vote.

Mr Musk has cast the money as both a prize as well as earnings for work as a spokesperson for the group.

Mr Krasner’s lawyers said Musk should be sanctioned for not attending the hearing.

The judge reserved any decision on that until it is clear whether the case will play out in federal or state court.

Lawyer Matthew Haverstick, representing both the billionaire and the political action committee, said the PAC, not Mr Musk, is the only proper defendant.

He said Mr Krasner named the tech mogul as a publicity stunt to draw attention to the case.

He also said that Mr Musk could not “materialise” in Philadelphia in the 12 hours since the hearing was scheduled on Wednesday.

A supporter of Republican presidential nominee former President Donald Trump, carries a sign (Nam Y Huh/AP)

Mr Krasner’s lawyers challenged that, saying the richest man in the world could land a SpaceX spaceship in the city to make the hearing if he wanted.

They also questioned the legality of the lottery, noting that several of the winners are in electoral vote-rich Pennsylvania, and that Mr Musk has not posted rules and regulations about the process.

Mr Krasner has said he could still consider criminal charges, since he is tasked with protecting the public from both illegal lotteries and “interference with the integrity of elections”.

Mr Krasner, in the suit, said that America PAC and Mr Musk “are indisputably violating Pennsylvania’s statutory prohibitions against illegal lotteries and deceiving consumers”.

Both Mr Trump and Kamala Harris have made repeated visits to the state as they fight for Pennsylvania’s 19 electoral votes.

Mr Musk, who founded SpaceX and Tesla and owns X, has gone all in on Mr Trump this election, saying he thinks civilisation is at stake if he loses.

He is undertaking much of the get-out-the-vote effort for Mr Trump through his super PAC, which can raise and spend unlimited sums of money.

He has committed more than 70 million US dollars to the super PAC to help Mr Trump and other Republicans win in November.