Mr. Musk has been barnstorming the country pushing former President Donald J. Trump’s candidacy. A centerpiece of that advocacy has been the petition, which asks registered voters from swing states to turn over their addresses, emails, and phone numbers in exchange for $47 and a chance to win $1 million in a daily random drawing, complete with sweepstakes-style oversized novelty checks.
Some campaign-finance lawyers, as well as Democratic opponents of Mr. Musk, have argued that America PAC’s offer amounts to paying people to register to vote, which is illegal. Mr. Musk’s defenders say it is merely a contest that is open to registered voters.
Mr. Krasner filed suit against America PAC and Mr. Musk on Monday, requesting that the state court put an immediate end to what Mr. Krasner said was “indisputably an unlawful lottery.”
His filing echoed a claim made by dozens of petition signers online that they have not yet received their promised payments. On Tuesday, America PAC announced that 87,000 checks had already been sent and another 100,000 would be mailed by the end of the week.
Mr. Musk’s lawyers countered in their filing with the U.S. District Court for the Eastern District of Pennsylvania that “the allegations in the complaint necessarily raise federal questions that are substantial and disputed.” The filing, known as a notice of removal, essentially seeks to take a civil matter filed in a state court and have it adjudicated before a federal court instead.
It was unclear whether the hearing scheduled for Thursday morning in Philadelphia would take place. A spokesperson for Mr. Krasner’s office declined to comment.
Mr. Krasner’s lawsuit does not appear to have slowed down Mr. Musk’s efforts on behalf of Mr. Tump. On Wednesday, America PAC announced its next $1 million winner and said it would continue to announce winners each day through Nov. 5.
This is a developing story.
Mr. Sanders recounted tales of families living paycheck to paycheck, and described elites and the status quo as “disgraceful” and “disgusting.” He grew louder as he talked about the ravages of addictions to alcohol and opioids, reaching a shout as he got to what he called the worst addiction of all: “It’s greed!”
The crowd roared in agreement.
On the campaign trail on behalf of Vice President Kamala Harris, Mr. Sanders is embracing a dark tone in his outreach to frustrated working-class voters, giving voice to a grimly populist message that contrasts with her campaign’s upbeat optimism.
Mr. Sanders has stumped across swing states for months, and the 83-year-old independent said in an interview that with the campaign’s end in sight, he planned to hold rallies through Election Day. His fiery speeches aim to win over voters leaning toward former President Donald J. Trump by acknowledging working-class anger over the economy. Short of that, he hopes to motivate reliable Democratic voters to turn out.
“Workers’ rights are on the table,” Mr. Sanders said. “That’s something I can’t sit out, so I will do everything I can to see that Trump is defeated and Harris is elected.”
Mr. Trump has long stoked working-class furor over what he terms a Washington elite putting down the Everyman and trying to keep Mr. Trump, a billionaire, out of the White House. He often calls the United States “a failing nation.” The playlist at his rallies invariably features “Rich Men North of Richmond,” a working-class lament that topped the charts last year, and prompts his crowds to sing along.
Ms. Harris and her allies have courted working-class voters, and she has secured the support of most major labor organizations, running in large part on President Biden’s record as what he calls the most pro-union president in history. But despite the Democrats’ wellspring of union support, some labor groups like the Teamsters have declined to endorse Ms. Harris, and many working-class voters, first animated by Mr. Trump in 2016, have retreated from the Democratic ranks over the perception that the party has grown out of touch with them.
A New York Times/Siena College poll this month found Ms. Harris’s support from white, non-college-educated voters nearly tied with the group’s support for President Biden in a 2020 election exit poll. But a CNN analysis suggested that, compared with Democratic candidates in the last three presidential elections, she could draw the smallest share of union household votes.
Mr. Sanders’s references to life under the ruling class led Rita Macomber, an Erie rallygoer and Harris supporter, to describe the Vermont senator with a phrase often applied to Mr. Trump: “He tells it like it is.”
Josh Boring, a 40-year-old member of the machinists’ union who attended the rally in Erie, said there was overlap between Mr. Sanders’s message and the energy behind Mr. Trump, which Democrats could use to their advantage. “I know a lot of people that are voting for Trump that actually like Bernie Sanders,” he said. “People on the left and Harris, they feel that anger and want to help with it.”
Mr. Sanders’s progressive reputation left some swing voters doubtful about his impact.
William Matlock, a 73-year-old former union worker at a locomotive plant, attended Mr. Sanders’s rally on Saturday and said he was already planning to vote for Ms. Harris. He described himself as a Trump-skeptical Republican with moderate political views, but said Mr. Sanders wasn’t a compelling surrogate.
“He’s a socialist and all that, so we really have not that much in common,” Mr. Matlock said, adding that he might leave to see a rally with Senator JD Vance of Ohio, Mr. Trump’s running mate, which took place around the same time in Erie. “That’s such a great weapon against her, you know? ‘Oh yeah, this communist over here, he’s voting for her.’”
But even if Mr. Sanders’s views limit his appeal in some areas, there are signs his message is amplified nationally, including to progressives who were among the most vocal to support his past presidential campaigns. The rally in Erie earned more than 800,000 views on X, and Mr. Sanders usually attracts hundreds of attendees in small, industrial cities, making his campaign events comparable in size to many held by the vice-presidential candidates. (Mr. Sanders is himself running for re-election.)
To longtime Sanders supporters, his focus on the economic divide will sound familiar.
“Where we are today is a nation moving rapidly in the direction of oligarchy,” Mr. Sanders said in an October rally in Baraboo, Wis. “That is where we are heading, unless together we reverse that course.”
Seven states allow selfies with mail-in ballots, but not at polling locations, and nine have laws that are unclear, the report said.
Why can’t we all just smile for the camera, the way voters in Alabama, California and 23 other states can without issue? The answer has its roots in longstanding debates over the sanctity of the voting booth and the protection of political speech.
“For some folks it may seem really stupid, like, I just want to take a selfie,” said Anthony Michael Kreis, a constitutional law professor at Georgia State University. “But it is a serious issue.”
State laws intended to protect privacy in the voting booth date to the late 19th century, when secret ballots were introduced with the goal of preventing vote buying and voter coercion. In the mid-2010s, those laws collided with the smartphone era.
The American Civil Liberties Union of New Hampshire challenged a state law banning ballot selfies in 2014, claiming that it restricted free speech. Election officials there countered that the law was still necessary to prevent voter intimidation.
The New Hampshire ban was officially overturned in 2016. States including Colorado and California later amended their laws to be friendlier to ballot selfies. In other states, including New York, bans were upheld.
Voting selfies — sometimes featuring marked ballots, but oftentimes not — have become a favored tool of celebrities hoping to encourage voting among their followers: Lady Gaga, Whoopi Goldberg, Blake Lively and Jennifer Aniston all posted them during the 2020 election.
But the singer Justin Timberlake ran afoul of a ballot-selfie ban in Tennessee in 2016, telling Jimmy Fallon afterward that he had “no idea” that his ballot box photo shoot had been illegal. Although his misstep became a social media punchline, Mr. Timberlake was not ultimately investigated by the Shelby County district attorney.
State laws against ballot selfies are typically “more bark than bite,” said Khadijah Silver, the supervising attorney for civil rights at Lawyers for Good Government. Last year, a Wisconsin judge dismissed a felony charge against a school board candidate who had posted a ballot selfie to Facebook.
Still, Mx. Silver and others argue that laws prohibiting ballot selfies are an outdated infringement on the right to political speech that can serve to intimidate voters, especially young people and people of color, who could be put off by the specter of fines or prosecution. They added that there was no evidence that ballot selfies had ever been used as “receipts” in illegal vote-buying transactions — a concern commonly cited by proponents of the bans.
“It’s a problem of the laws not keeping up with technology, not keeping up with human behavior,” Mx. Silver said. “We need to be getting rid of these laws in order to establish a healthier, more welcoming culture in the voting booth.”
Some scholars disagree. The U.C.L.A. law professor Richard L. Hasen, a vocal critic of ballot selfies, argued in The New York Times’s opinion section in 2016 that laws against them remained necessary to shore up election integrity.
“There are a ton of ways to express your support for voting for or against a candidate without taking a picture of the one thing which can serve as proof of how you voted,” he wrote, “and thereby open the window up for vote buying or coercion from your employer, spouse, religious leader or union boss.”
The 2024 election is accompanied by its own set of concerns, Professor Kreis said. He pointed to Elon Musk’s recent $1 million, sweepstakes-style payouts to registered voters in battleground states, which drew criticism from legal experts who said it might violate a federal law against paying people to register to vote. (Philadelphia’s district attorney sued Mr. Musk over the scheme on Monday, calling it an “unlawful lottery.”)
Professor Kreis is not convinced that ballot selfies are a threat to fair elections. At the same time, he said, “a nuanced conversation needs to be had about exactly why these laws are put in place, and if there are alternative and less restrictive means of achieving this anti-corruption endeavor without restricting free speech,” he said.
Professor Kreis, who lives in Georgia, one of the states where it is illegal to photograph a ballot at the polls, urged his followers on X to post a cheery illustration of a peach rather than the far more fraught ballot selfie.
“I think that there are a lot of ways that people can be creative,” he said.
On Wednesday, he delivered similar remarks but added a new twist as he described onstage what he had told his advisers: “I said, well, I’m going to do it whether the women like it or not. I am going to protect them.”
Polls show that Mr. Trump is already facing a significant deficit with female voters in his race against Vice President Kamala Harris, the first woman to serve as vice president. Ms. Harris has tried to appeal to moderate Republican and independent women, particularly in the suburbs, by talking about her support for abortion rights and casting Mr. Trump as divisive and reactionary.
The former president’s remarks on Wednesday mean that, for many voters, his closing message is being defined, in part, by racist jokes about Puerto Rico told by a comedian at his rally in New York this week and, now, a striking display of machismo.
Ms. Harris quickly sought to respond, writing on X: “Donald Trump thinks he should get to make decisions about what you do with your body. Whether you like it or not.” Her campaign posted a series of videos on social media emphasizing Mr. Trump’s remarks. And it sent out a news release that blared: “In Wisconsin, Trump reminds women how little he values their choices.”
Asked to comment, Karoline Leavitt, a spokeswoman for the Trump campaign, did not address Mr. Trump’s remarks. But she said the Biden-Harris administration had left women “worse off financially and far less safe than we were four years ago under President Trump.”
“Women deserve a president who will secure our nation’s borders, remove violent criminals from our neighborhoods, and build an economy that helps our families thrive,” she said in a statement.
Over the course of the campaign, Mr. Trump and his allies have made a series of misogynistic, sexualized attacks against Ms. Harris. In August, Mr. Trump used his social media website to amplify a crude remark about her that falsely suggested she had traded sexual favors to help her political career. On Sunday, at his Madison Square Garden rally, one speaker referred to Ms. Harris as having “pimp handlers.” And a super PAC financed by his ally Elon Musk released an ad that called her a “C word,” although the ad eventually revealed that the word was “communist,” rather than the slur for women.
As the gender gap widens between Ms. Harris and Mr. Trump, even women in his own party have warned that he risks alienating a crucial slice of the electorate. Nikki Haley, who served as Mr. Trump’s United Nations ambassador before challenging him in the Republican primaries this year, criticized the recent sexist and crude attacks lodged at Ms. Harris during an interview on Fox News on Tuesday, warning that it made women “uncomfortable.”
“That is not the way to win women,” Ms. Haley said. “That is not the way to win people who are concerned about Trump’s style.”
“This is not a time for them to get overly masculine with this bromance thing that they’ve got going,” she added. “Fifty-three percent of the electorate are women. Women will vote. They care about how they’re being talked to, and they care about the issues.”
This month during a Harris campaign event in Michigan, former Representative Liz Cheney, the most prominent Republican to endorse Ms. Harris, also pointed to Mr. Trump’s crassness, particularly when it came to women, and urged them to vote against him.
“When you think about that level of instability, the level of erratic decision-making, the misogyny, that’s not someone that you can entrust with the power of the Oval Office,” Ms. Cheney said.
Mr. Trump has been accused by roughly two dozen women of sexual misconduct. In 2016, the “Access Hollywood” tape caught him boasting about grabbing women by the genitals, remarks he later dismissed as “locker room banter.” The writer E. Jean Carroll said he raped her in the dressing room of a Manhattan department store in the 1990s. In civil proceedings, Mr. Trump was found liable for sexually abusing and defaming Ms. Carroll, and ordered to pay hefty fines. Mr. Trump is appealing the case.
In his attacks on Ms. Harris over the course of his rally on Wednesday, Mr. Trump repeatedly insulted her intelligence — referring to her as a “low IQ individual” and comparing her negatively to Brett Favre, the former N.F.L. quarterback who served as the event’s celebrity guest.
“Kamala Harris is not fit to be president of the United States,” Mr. Trump said. “She doesn’t have the intellect, the stamina, or that special quality that real leaders must have to lead. We know what that is. It’s a special quality.” He claimed that Mr. Favre had that “special” quality.
Mr. Trump then detailed conversations that he claimed he had been having with his staff, who pleaded with him not to make the claim about protecting women.
‘Sir, please don’t say that,” Mr. Trump recalled. “‘Why?’ They said, ‘We think it’s, we think it’s very inappropriate for you to say. I say why, I’m president, I want to protect the women of our country. They said — they said, ‘Sir, I just think it’s inappropriate for you to say.’”
Mr. Trump then recalled his defiant response.
“So I said, I’m going to defend it and I’m going to protect women,” he said. “I’m not going to let people go into the suburbs or go into places where they live, whether suburbs or cities or farms. We’re going to protect our women at the border. We’re going to protect our women — and also, we’re going to protect our men.”
The thousands who attended the rally were rapt. Mr. Trump looked to them for validation.
“Is there any woman in this giant stadium who would like not to be protected?” Mr. Trump asked.
The room was nearly silent.
“Is there any woman in this stadium that wants to be protected?” Mr. Trump asked.
The crowd roared.
“Democracy is not working the way it should,” Alex Niemczewski, chief executive of the organization, said on Wednesday. “Voters don’t have a choice.”
The survey covered some 44,650 elective offices across counties with more than 50,000 residents, or about 88 percent of the nation’s population. Both partisan and nonpartisan offices were included. Most single-candidate offices were concentrated in hyperlocal jurisdictions like water-management or conservation boards, and in county governments, the data showed. Competition was more common for city, state and federal offices.
But the findings varied, sometimes wildly, from state to state. A mere 22 percent of elective offices are uncontested this fall in New Hampshire, the lowest total among states (only Connecticut, with 24 percent, came close). Alabama, 90 percent of offices on the November ballot are uncontested was the highest.
In eight jurisdictions, at least 80 percent of offices fielded just one candidate: Arkansas, the District of Columbia, Kansas, Mississippi, Missouri, Oklahoma, South Dakota and Texas.
Uncontested races are an old and much-debated phenomenon in American politics, and even the BallotReady survey does not capture its scope. In a nation where many Republicans and Democrats have sorted themselves into separate geographic islands, many elections are so lopsided that they might as well have gone uncontested.
Ms. Niemczewski said she believed that Americans knew too little about the democratic process to be full participants. “People don’t know what’s going to be on the ballot,” she said. “They don’t know who represents them.”
The survey did not break down the list of uncontested races by party, but Ms. Niemczewski said it appeared that more single-candidate offices were in rural areas, which are predominantly Republican.
That is consistent with a study of about 29,400 partisan offices in the 2022 midterms, which found that Democrats were more than three times as likely as Republicans to not field a candidate for the job.
And he has also done so, albeit more quietly, inside of his adopted home state, wading into local election contests in Texas where his sizable contributions can make an even bigger difference.
In September, Mr. Musk gave $1 million to one of the major power players in Austin, Texans for Lawsuit Reform, a group committed to reining in tort lawsuits and the large costs they often impose on businesses. Less than two weeks later, he cut an even larger check, for $2 million, to a political action committee affiliated with the Austin-based group.
That $2 million donation, to Judicial Fairness PAC, has been helping to fund active campaigns to elect Republican judges by arguing that Texas cities are in the grip of a crime wave.
Over the last month, Judicial Fairness PAC has spent nearly $15 million, including more than $6.9 million on advertising and direct mail in support of another political action committee, Stop Houston Murders, according a state filing period that ended Saturday.
“No matter who you support for president,” read one of the mailers sent by Stop Houston Murders, “vote out soft-on-crime Democrat judges.”
Judicial Fairness PAC has also funded similar mailings in Dallas, and is supporting appeals court candidates in the Rio Grande Valley. The effort has received backing from several top Republican donors in Texas.
It was not clear why Mr. Musk decided to lend his support as well. Mr. Musk’s companies are located in several Texas cities, including Austin, Bastrop and Brownsville, but not Houston or Dallas. Among the races targeted by the committee are several seats on an appeals court in South Texas that covers Cameron County, where SpaceX, which is one of Mr. Musk’s companies, is located.
He did not responded to a request for comment on the contributions. In a statement, Lee Parsley, president of Texans for Lawsuit Reform, said that Mr. Musk was “one of hundreds of contributors” to the group. He said the organization would “continue working to make Texas’ civil justice system fair and efficient” and “advocate for the election of a fair judiciary.”
Since moving from California to Texas, Mr. Musk has surrounded himself with a more conservative social circle, including tech entrepreneurs who are active in Texas state politics.
And he has struck up a friendship with Dick Weekley, a wealthy Houston-based homebuilder who co-founded Texans for Lawsuit Reform in the 1990s.
“If he’s interested in having a conservative state legislature and judiciary, that donation to T.L.R. certainly makes sense,” said Mark McCaig, a conservative activist based in Houston. “Elon is certainly somebody I want on my team.”
Mr. Weekley and two of his top political aides, Ryan Dumais and Denis Calabrese, were part of the initial crew that helped Mr. Musk plan his pro-Trump super PAC, America PAC, meeting with Mr. Musk each Friday for up to an hour.
Now, by pouring millions into Texans for Lawsuit Reform and the campaigns it is backing, Mr. Musk appeared to have injected himself into the middle of a protracted battle between factions of the Republican Party in Texas.
The two main factions are a traditional coalition of business-focused conservatives, including Mr. Weekley, and a more religiously conservative, Trump-aligned faction that has been ascendant in the state. They clashed most prominently last year over the impeachment trial of the state’s attorney general, Ken Paxton, who had strong support from the Trump-aligned conservatives; the impeachment was rejected in the Senate.
Each side has been eager for Mr. Musk’s support. Those in Mr. Paxton’s corner welcomed the news, earlier this year, that Mr. Musk had brought in a new crop of political operatives to steer his America PAC, and that Mr. Weekley and his aides at Texans for Lawsuit Reform were no longer working with him.
Mr. Musk, these days, frequently posts on social media about the problems he sees with crime and immigration, two issues that are commonly pushed by Republicans of all stripes in Texas.
One of his first political forays into the state came earlier this year, when Mr. Musk contributed to a group that tried unsuccessfully to oust the Democratic district attorney for Travis County, which includes Austin.
In Houston, Republicans have for several cycles now attempted to retake judicial seats that were lost in a Democratic wave in Houston in 2018.
Judicial Fairness PAC has been supporting Stop Houston Murders since it first became active during the 2022 election, after homicides in the city reached record levels in 2021.
But the numbers have since declined, following a national trend in most major cities. So far this year, Houston has seen fewer homicides than it did at the same point in 2020, the year a surge in crime began during the coronavirus pandemic.
On Wednesday, Judge Jeffrey G. Trauger of the Bucks County Court of Common Pleas granted the Trump campaign’s request to extend the mail ballot application deadline. Voters now have until the close of business on Friday to apply in person.
In Pennsylvania, voters can apply for a mail-in ballot. If deemed eligible to vote, they can fill out and deliver the ballots at the county offices on the same day or return to drop them off on another day.
The lawsuit, which was jointly filed by the Trump campaign, the Republican National Committee and David McCormick, a Republican candidate for Senate, cited voters who were told by county officials as early as 2:40 p.m. on Tuesday that they would not be able to apply for the ballot.
“We will keep fighting,’’ Michael Whatley, the chairman of the Republican National Committee, said in a post on social media about the ruling. “Go vote! Stay in line!”
The American Civil Liberties Union, which is often on the opposite side of Republican groups on legal challenges to voting procedures, applauded the judge’s decision and said it had received similar complaints from voters being turned away from the mail-in ballot lines in Bucks County.
“I am glad they were able to get this order so people who need to apply for a mail-in ballot can do so,” Sara Rose, the A.C.L.U.’s deputy legal director of Pennsylvania, said in an interview.
A spokesman for Kamala Harris’s campaign declined to comment on the Bucks County lawsuit.
In a statement, a spokesman for Al Schmidt, Pennsylvania’s secretary of state, who oversees voting rules and procedures in the state, said that election officials in all 67 counties were told that they needed to ensure that people who joined the lines before 5 p.m. on Tuesday received a ballot application.
Mr. Schmidt’s office said Pennsylvania election officials have received 120,000 in person requests for mail-in ballot applications, including nearly 20,000 on Tuesday alone.
Kirsten Noyes contributed research.