PHILADELPHIA — A legal fight over Elon Musk’s $1 million-a-day voter sweepstakes is back in state court in Pennsylvania, a loss for the billionaire, after a federal judge said Friday that he doesn’t have jurisdiction.

Philadelphia District Attorney Larry Krasner wants to keep his fight to shut down the giveaways in state court, calling it a violation of state lottery laws. Musk had argued that the case belonged in federal court as it involves claims of federal election interference.

Musk’s political organization, which aims to boost Donald Trump’s presidential campaign, has organized the sweepstakes as a way of encouraging people to be registered voters in key battleground states.

With just days to go until Tuesday’s presidential election, the case now returns to Judge Angelo Foglietta, who held a brief hearing Thursday in a courtroom at Philadelphia City Hall. No further hearings were immediately scheduled. U.S. District Judge Gerald J. Pappert, a Republican appointed to the federal bench by President Barack Obama, issued Friday’s ruling.

— The Associated Press