Voting by U.S. troops has been thrust into the spotlight as a bitter election campaign comes to a close, with opponents of President Trump alleging that his efforts to limit mail-in voting could disenfranchise military families.

Democrats have raised the issue repeatedly after the president said last week that it would be “very proper and very nice” if a winner was declared on Election Day. Trump added that it was “totally inappropriate” for ballots that arrive later to be included, even though the votes of hundreds of thousands of service members that are sent by mail have been counted afterward for years.

Trump’s opponents have pounced on the comments, suggesting that they show the president is willing to win at all costs, even if doing so hurts military families.

“I don’t know what Donald Trump has against military members and their families, but right now his allies are doing everything they can to make it harder for those serving overseas to have their votes counted,” former South Bend, Ind., mayor Pete Buttigieg, a supporter of Joe Biden who served in the Navy in Afghanistan, tweeted Sunday night.

The Lincoln Project, a political activist group formed by Republican operatives who oppose the president, released an online ad Monday narrated by actor Mark Hamill saying Trump has called for the election to be decided based only on ballots that arrive by Nov. 3.

“If he gets his way, many who cast absentee ballots will not have their vote counted,” Hamill said in the ad. “This will deny thousands of troops serving overseas of their most sacred right. Stripping the men and women in our military of the very freedoms they served and sacrificed to defend — it cannot be allowed to happen.”

A Trump campaign spokeswoman, Thea McDonald, sought to clarify the president’s comments on Monday, drawing a distinction between military ballots and others.

“President Trump believes that military ballots should be accepted according to the law, as always, and that the law should be applied as written to everyone else,” McDonald said. “There are and should be exceptions for our military members serving our country overseas. There should not be exceptions for the Democrats in Philadelphia who attempt to vote after Election Day.”

But questions remain about how many votes cast by service members and their families will be counted, amid a slowing of the mail caused in part by the coronavirus pandemic and in part by changes made by the Trump administration to the U.S. Postal Service.

Trump and his allies have continued to signal that they could challenge any mail-in or absentee ballots received after Election Day. During a rally on Sunday, Trump warned that as soon as the polls close, “we’re going in with our lawyers.”

The courts have issued mixed rulings on the matter. The Supreme Court rejected Wisconsin’s request to extend the deadline for counting mail-in ballots but permitted extended periods for receiving mail-in ballots in Pennsylvania and North Carolina.

In Minnesota, a three-judge panel of the U.S. Court of Appeals for the 8th Circuit ruled late last week that a Republican lawmaker and a GOP activist could challenge the state’s plans to continue counting votes received within seven days of the election.

The appeals court ordered Minnesota to set aside any ballots received after 8 p.m. on Nov. 3, meaning those votes could be discarded depending on future court rulings. The ruling came after election authorities in the state had already informed voters in the mail-in instructions that their ballots would be counted so long as they were postmarked by Election Day and arrived within a week after the vote.

Maj. Scott Hawks, a spokesman for the Minnesota National Guard, said the state has more than 900 soldiers and airmen deployed worldwide. Others on the rolls as Minnesota residents and deployed with active-duty units also could be affected.

The effort to count votes from the military has long been flawed and varied state to state.

More than 252,000 uniformed service members stationed away from home and their families voted in the 2016 general election, according to Count Every Hero, an initiative established by RepresentUs, a nonpartisan anti-corruption group, that promotes the right of service members to vote.

Twenty-eight states and D.C. accept and count ballots from overseas service members that arrive after Election Day, according to a recent report by Count Every Hero. More than 70 percent of the available votes in the electoral college will come from states that count overseas military votes after Election Day, the report said.

The deadlines vary: South Carolina, for example, will count mailed absentee ballots from service members abroad if they are sent before the close of the polls and received within two days of the election, while Washington state will count ballots that arrive by Nov. 23, according to the report.

Steve Abbot, a retired Navy admiral who is now a co-chair of Count Every Hero, called Trump’s comments about not counting ballots after Election Day a “torpedo in the water.”

“Elections don’t end on the specified day of the election because the results can’t possibly all be tallied on time,” said Abbot, who served in the administration of President George W. Bush after retiring from the military. “We would counsel patience by every single citizen, including the president, to wait for a proper tally on all of the votes.”

Several active-duty service members, speaking on the condition of anonymity because of the sensitivity of the issue, said they watched closely this year after casting ballots from overseas and were concerned.

A Marine Corps gunnery sergeant in Japan said that he has voted by absentee ballot before but did not trust the mail to send it back to his home state of Florida in time this year. Instead, he said, his wife filled out the ballot in the United States for him during a video call.

“Last election, my absentee ballot didn’t arrive until Election Day,” he said. “So that wasn’t ideal.”

An Army officer in Europe said he voted in North Carolina by sending a ballot online — an option that does not exist in every state. His biggest concern, he said, was signing his name with a computer mouse the same way that he does with a pen.

The challenges apply to service members and their families in the United States, too.

Margaret Smith said she and her husband, a member of the Air Force, live on Eglin Air Force Base in Florida. She said she mailed a form requesting a ballot to her jurisdiction of Bell County, Tex., on Oct. 14 and called repeatedly afterward knowing that her request for a ballot was due Oct. 23, according to state law. She never got the help she needed, she said.

“It’s not going to count because we didn’t get to vote,” she said Monday. “We can’t just get up and go to Texas tomorrow.”

Matthew O. Dutton, the Bell County interim elections administrator, said in an email that his office never received her request.