Debbie Rieger heads to the voting booth to cast her ballot at Hillsboro Old Stone School November 07, 2017 in Purcellivlle, Va. (Katherine Frey/The Washington Post)

RICHMOND — A civil rights group filed a lawsuit Monday that seeks to stop election officials from declaring a winner in a state House of Delegates race that could determine which party controls the chamber.

The NAACP Legal Defense and Educational Fund filed a lawsuit in Stafford County nearly a week after Election Day, claiming that local election officials gave "conflicting and misleading instructions" to voters who had cast provisional ballots.

"At the heart of this lawsuit is the ability of voters to have their voices heard," said Sherrilyn Ifill, president of the legal defense fund. "When extraordinary steps are taken to impede the electoral process, we must act swiftly to ensure that each and every citizen has a meaningful opportunity to participate."

At the heart of the lawsuit is the race to fill the House seat being vacated by retiring Speaker William J. Howell (R-Stafford). Republican Robert Thomas is ahead of Joshua Cole by 86 votes.

The lawsuit was filed on behalf of two Stafford County residents, Terry Caldwell and Rachel Watsky, who were required to use provisional ballots on Election Day.

Voters are given provisional ballots if there is a question about whether they are entitled to vote. That happens when voters come to the polls without proper identification, if their names do not appear on voter rolls or if records indicate they have already voted absentee.

Caldwell was told he would have to vote provisionally because county records indicated — erroneously, the suit claims — that he had voted absentee. Watsky was told — also incorrectly — that she had requested an absentee ballot, according to the complaint.

The suit asserts that poll workers gave Caldwell and Watsky contradictory information about how and when they could provide county officials with the information needed to ensure that their votes would be counted.

One notice directed them to return to the county elections office Friday, but the office was closed that day for Veterans Day. Another notice directed them to appear before the Stafford County Electoral Board on Monday. They could not clarify the instructions because the registrar's office was largely "offline" in the days following the election, the suit says.

The lawsuit names county Registrar Greg Riddlemoser and members of Stafford's electoral board as defendants. They could not be reached for comment late Monday.

Virginia general election guide

Filed in Stafford County Circuit Court, the suit seeks to prevent the board from declaring a winner in the election on Tuesday as planned. A hearing on the suit has been scheduled for 9 a.m.

The lawsuit comes on top of Democrats' claim that 55 absentee ballots from active-duty military voters went uncounted because they were left in the Stafford County registrar's mailbox on Election Day — an account the registrar disputes.

"It's disgraceful that the registrar and two members of the Stafford County Electoral Board refuse to count military votes," Susan Swecker, chairwoman of the Democratic Party of Virginia said in a statement.

Riddlemoser has said all ballots that arrived on time were counted. He said Democrats appeared to be referring to 55 absentee ballots that arrived Wednesday, missing the 7 p.m. Tuesday deadline. He also said the 55 ballots were mailed in by absentee voters of all stripes, not specifically by those in the military.

"I believe the apparent controversy is a result of misunderstanding what my office and what the Stafford County Electoral Board can lawfully do," Riddlemoser said in a statement issued Saturday. "Under Virginia law . . . we can only count those absentee ballots that were returned to the registrar's office by 7 p.m. on the day of the election — the same time the other polls close."

He said it is not unusual for ballots to trickle in after Election Day.

"With every election, my office typically continues to receive late absentee ballots for weeks — and sometimes even months — after an election has come and gone," he said. "We cannot count these ballots without an order of a court . . . and instead store them, (unopened) in a secure manner in the custody of the Stafford County Clerk of Court."

On Nov. 7, Democrats made huge gains in the House as they also swept statewide offices for governor, lieutenant governor and attorney general.

Before the election, Republicans enjoyed a 66-to-34 majority in Richmond's lower chamber. Now Democrats are within striking distance of taking control. They need one more victory to force a power-sharing agreement with Republicans and two more to take the reins of the chamber for the first time since 2000.

Democrats have secured victories in 49 out of 100 seats, with Republicans holding narrow leads in the Thomas-Cole contest and two others.

After elections officials examined provisional ballots cast in District 40 on Monday, Del. Timothy D. Hugo (R-Fairfax) saw his 115-vote lead over Democrat Donte Tanner shrink to 106 votes. In District 94, Del. David E. Yancey (R-Newport News) had his 13-vote lead over Democrat Shelly Simonds dwindle to 10.

Recounts cannot commence until election results are certified shortly before Thanksgiving.