Nicole Wittmann has been a prosecutor in Loudoun County, Va., for 15 years, taking on some of the highest-profile violent-crime ­cases in the D.C. exurbs alongside Commonwealth’s Attorney Jim Plowman. She hopes to replace her fellow Republican this November.

But a group of voters says Wittmann has lied about living in Loudoun in recent months and is ineligible for the office. If it succeeds in pushing her off the ballot, that will clear a path for Buta Biberaj, a progressive reformer who would be Loudoun’s first Democratic chief prosecutor in more than two decades.

Four people, including the chair and a vice chair of the local Democratic Party, have filed a lawsuit seeking to remove Wittmann from the race.

At issue is whether Wittmann lived in Loudoun when she registered to vote there in February — or with her family in neighboring Fairfax County. A candidate for commonwealth’s attorney must be able to vote for that office; the suit argues that her voter registration and thus her candidate registration are invalid. The deadline to file as a candidate was in June.

“The charges of voter fraud against Nicole Wittmann are very troubling for our community,” Biberaj said in a statement. “For Loudoun County residents to trust the criminal justice system, we have to trust its prosecutors. . . . Nicole Wittmann’s decisions violate that trust.”

Wittmann is fighting back aggressively, saying that she has been living in Loudoun and that her voter registration is valid. She had been renting a room from a colleague in Leesburg since February; she and her husband put their Herndon, Va., home on the market in July and bought a house in Loudoun in August.

“Biberaj is taking this cheap shot because she can’t defend her total lack of experience and her record of coddling dangerous criminals to the voters of Loudoun County,” Wittmann’s attorney, Charlie King, said in a statement. “I want a trial date as soon as possible.”

Wittmann did not comment outside the statements from King.

A hearing date is not yet set; Loudoun’s judges are recusing themselves, and the state Supreme Court will assign the case elsewhere. King successfully defended former state delegate David Ramadan against similar accusations in 2011. In that case, Ramadan had bought a home in his district three years before the election, and neighbors testified that he was rarely seen at his previous house after declaring his candidacy.

Biberaj is hoping to follow in the footsteps of upstart candidates in Arlington and Fairfax counties who upset longtime commonwealth’s attorneys in Democratic primaries this year with promises to stop asking for the death penalty, cash bond or any punishment for marijuana possession. The three are part of a growing movement that aims to overhaul the criminal justice system from the perch of prosecutors’ offices — a trend recently criticized by Attorney General William P. Barr as “dangerous.”

According to the petition filed in Loudoun County Circuit Court, Wittmann has been living with her husband and children in Herndon, in Fairfax County. Until February, she used the family’s address in Herndon for utilities, employment forms and voter registration.

Five days after Plowman was elected a circuit court judge, Wittmann changed her voter registration to a house in Leesburg, the residence of another prosecutor in her office.

She listed the landline at the Herndon home as her phone number in a February ethics filing, according to the petitioners, who contend that her car is regularly parked in Herndon and she continues to receive mail there.

The petition calls her room rental “a ruse” and her voter registration thus invalid.

Beyond the eligibility question, the differences between the two candidates are sharp.

Biberaj, a Leesburg criminal defense attorney and substitute judge, said in her announcement that she has seen “first-hand the inequities of the legal system” and became a lawyer to “change the world for the better.”

She says the prosecutor’s office wastes time and money on non­violent cases, especially those involving minors, that don’t make the community safer.

“If you want to make some changes, I am your person,” she said at a recent event. “We are going to have a different vision for what justice looks like in Loudoun County.”

While Wittmann’s website says she believes that “incarceration is not always the answer,” her focus is on crime and punishment. In her announcement, she boasted that she had “put more murderers in prison for life than any other prosecutor in Loudoun.”

Among them: Steven ­Combs-LaFleur, who killed his wife with a sledgehammer; Braulio Castillo, who strangled his estranged wife and tried to stage her death as a suicide; and Timothy William Warnick, who robbed and killed a man in 1988 and was apprehended 30 years later.

She also prosecuted Michael Gardner, who is serving a 22-year sentence for molesting young girls during a slumber party; and Guillermo Enrique Figueroa-Menendez, serving six life sentences for molesting a minor for years.

“We’re career law enforcement people, we’re the reason your community is as safe as it is,” Wittmann said at a recent event with Sheriff Mike Chapman (R). Her opponent, she said, “wants to bring to Loudoun . . . Chicago, Philadelphia, New York values.”