Elon Musk’s daily million-dollar voter giveaway survived a legal challenge by Philadelphia’s district attorney ahead of Tuesday’s presidential election as a judge in the crucial battleground state of Pennsylvania declined to block it.

Pennsylvania Judge Angelo Foglietta on Monday rejected a request to halt the contest by the DA, who called it an illegal lottery. The ruling came shortly after a hearing where Musk’s lawyer said that the contest winners weren’t picked at random.

More stories like this are available on bloomberg.com