Del. Nicholas J. Freitas (R-Culpeper) speaks during a U.S. Senate candidates debate in 2018 at the Virginia tea party annual convention in Richmond. (Mark Gormus/AP)

Virginia’s board of elections has ruled that Del. Nicholas J. Freitas (R-Culpeper) did not qualify for the ballot this fall, upholding a finding from elections department staffers.

The ruling amounts to an unforced error for state Republicans, who are scrambling to protect narrow majorities in the legislature with all 140 seats on the ballot this November.

Republicans hold a 51-to-48 edge in the House and a 20-to-19 advantage in the Senate, with one vacancy in each chamber.

Freitas’s largely rural district in Orange, Madison and Culpeper counties has been safely red, but his predicament creates a hurdle for holding the seat.

The former Green Beret first won the seat in 2015, and unsuccessfully sought the GOP nomination to challenge U.S. Sen. Tim Kaine (D-Va.) in elections last year.

Freitas can now either file a lawsuit challenging the state’s ruling or run as a write-in candidate.

The slip-up came after the state elections department said it did not receive paperwork in time for Freitas to qualify for the ballot. Two other candidates across the state — a Republican and a Democrat — also filed paperwork late, but were both allowed to qualify after their mistakes were cleared up.

The elections department said Freitas had failed to file additional paperwork that made his situation different. Freitas’s local Republican legislative committee never submitted a required form indicating that Freitas was the party’s nominee. And Freitas failed to submit another form, which he personally should have filed as a candidate, the state said.

Democrat Ann Ridgeway, a former teacher and juvenile probation officer, is now alone on the ballot.

Laura Vozzella contributed to this report.