PHILADELPHIA (AP) — 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 former Pennsylvania attorney general appointed to the federal bench by President Barack Obama, issued Friday's ruling. "Defendants argue the complaint’s references to ‘the forthcoming Federal Presidential Election’ show the lawsuit necessarily raises questions of federal law. But federal question jurisdiction does not turn on a plaintiff’s motivations in filing suit; it turns on whether the legal issues arising from the claims originate in federal or state law,” Pappert wrote.

Krasner lawyer John .