A US judge has denied Elon Musk's bid to move a Pennsylvania lawsuit over his $US1 million ($A1.5 million) voter prizes to federal court, moving the case back to state court.
It was not immediately clear if the decision would affect the billionaire's plan to keep awarding money until the US presidential election on Tuesday.
The decision was issued by US District Judge Gerald Pappert in Philadelphia federal court.
Musk has been giving $US1 million ($A1.5 million) cheques to randomly selected registered voters who sign a petition supporting free speech and gun rights.
Musk's America PAC had awarded monetary prizes to 14 people as of Friday and said the final prize will be given on Tuesday.
Democratic Philadelphia District Attorney Lawrence Krasner sued Musk and his political action committee, which backs Republican former President Donald Trump, on October 28 in a state court to try to block the giveaway.
Krasner called the program an illegal lottery.
Two days later, Tesla CEO Musk and his America PAC sought to move it to federal court, arguing Krasner's lawsuit raised questions about free-speech rights and election interference that belong in federal court.
That prompted the state judge who had been overseeing the case to put it on hold.
In arguing that the case belonged in state court, Krasner called Musk's manoeuvre an attempt to "run the clock until election day."
Krasner did not allege the giveaway violates federal law.
Philadelphia is the largest city in Pennsylvania, one of seven battleground states likely to determine the outcome of the race between Trump and his Democratic opponent, Vice President Kamala Harris.
Musk's offer is limited to registered voters in the seven states expected to decide the election - Arizona, Georgia, Michigan, Nevada, North Carolina, Pennsylvania and Wisconsin.
Musk gave away the first cheque at an October 19 America PAC rally in Harrisburg, Pennsylvania's state capital.
The giveaway falls in a grey area of election law, and legal experts are divided on whether Musk could be violating federal laws against paying people to register to vote.
The US Department of Justice warned America PAC the giveaway could violate federal law, according to media reports, but federal prosecutors have not taken any public action.
Musk has so far given nearly $US120 million ($A183 million) to America PAC, according to federal disclosures.