Joshua Cole, Democratic candidate for delegate in the 28th district, speaks to protesters gathered outside the Stafford County Government building in Stafford, Va., on Monday. (Mike Morones/AP)

A federal judge in Alexandria declined Friday to force a count of 55 absentee ballots that could help determine control of the Virginia House of Delegates.

In the race to fill the seat held by retiring Speaker William J. Howell (R-Stafford), Republican Robert Thomas is ahead of Joshua Cole by 82 votes. Cole’s campaign filed suit arguing that 55 absentee ballots that arrived in Stafford County the day after the Nov. 7 election were late because of postal-office problems and should be counted.

Judge Claude M. Hilton disagreed.

“These ballots were late,” he said. Everyone, Hilton added, wonders sometimes “what’s wrong with the mail.” But he saw no evidence of “improprieties” here.

Cole’s campaign pointed to an email sent to state officials the day after the election by Greg Riddlemoser, general registrar of Stafford County, saying that “there is no possible way in my military mind that these ballots should not have been available to us on Election Day before close-of-polls.”

Amanda Callais, an attorney for the Cole campaign, said in court Friday that the registrar’s email indicates that “these ballots would have arrived but for the mistake of a government official.”

While even 55 votes entirely for Cole would not give him victory, Callais argued that with the final counting of provisional ballots and correction of errors, the race could swing in his favor.

On the stand Friday, Riddlemoser said he had no evidence that the Postal Service made a mistake. He said the email he wrote was “unnecessary and unfortunate.”

He explained that he was moved by the plight of Laura Sellers, a local supervisor who lost her seat by a dozen votes. Her father came into the election office the day after the election and “was quite upset,” Riddlemoser said. The office staff, who know and like the Sellers family, were “quite upset as well,” he said.

“They’re good people,” Riddlemoser said.

“This is a very close election, and there are strong emotions on both sides,” said Patrick T. Lewis, an attorney for the Republican Party of Virginia, which opposed the suit. “We have no reason to believe that the post office was not acting with diligence.”

Election officials in Stafford County voted 2 to 1 Monday not to count the ballots. A Stafford Circuit Court judge on Tuesday threw out a different lawsuit focused on the same race, arguing that voters required to cast provisional ballots on Election Day were given “conflicting and misleading instructions.”

The latest stories and details on the 2017 Virginia general election and race for governor.

A spokesman for Del. M. Kirkland Cox (R-Colonial Heights), who will become speaker if the GOP holds its majority, praised the ruling. “We are pleased the judge applied the law fairly and evenly, as did the local electoral board,” spokesman Parker Slaybaugh said. “We hope House Democrats will end the unnecessary litigation so Bob Thomas can begin preparing to serve the people of the 28th District.”

Marc Elias, a lawyer hired by the Virginia House Democratic Caucus to represent Cole, said Democrats are weighing their options. “We are disappointed with the court’s ruling that effectively disenfranchises 55 voters who submitted their ballots correctly but whose voices remain unheard due to an error of the United States Postal Service,” he said in a statement.

The Democrats also assert that 668 Fredericksburg voters were given the wrong ballots, causing them to vote in the race for House District 88 rather than 28.

In a letter to the state elections board, Elias said Fredericksburg officials improperly split two precincts that are entirely within District 28, giving some voters ballots for that House race and others ballots for the District 88 contest. Elias asked the board to exclude votes cast in the two precincts from the District 88 totals and to decline to declare a winner in District 28 when it meets Monday to certify the Nov. 7 election results.

Del. C. Todd Gilbert (R-Shenandoah), who will become House majority leader if the GOP retains control, said the Democrats’ claim is based on outdated precinct lines.

Fredericksburg City Attorney Kathleen Dooley confirmed in an email to The Washington Post on Friday that after the city adjusted precinct lines in 2011, it created splits in the two precincts Elias referenced.

The District 28 race is one of three likely headed for a state-funded recount after the Nov. 7 election, in which Democrats made huge gains in the House and swept statewide offices for governor, lieutenant governor and attorney general.

Before the election, Republicans boasted a 66-to-34 majority in Richmond’s lower chamber. Now the count is 49 Democrats and 51 Republicans, putting Democrats within striking distance of taking control. They need one more victory to force a power-sharing deal with Republicans and two more to take the reins of the chamber for the first time since 2000.

Republicans hold narrow leads in the Thomas-­Cole contest and two other contested races. In those, Del. Timothy D. Hugo (R-Fairfax) has a 106-vote lead over Democrat Donte Tanner, while Del. David E. Yancey (R-Newport News) is up just 10 votes over Democrat Shelly Simonds.