Not long ago, Democrats across Virginia felt compelled to emphasize their commitment to be tough on crime. On Tuesday, two Northern Virginia prosecutors with decades of experience lost to newcomers pledging to put fewer people behind bars.

In off-year primaries in a state often watched as a barometer of the national political mood, Parisa Dehghani-Tafti beat Theo Stamos in Arlington, and Steve Descano defeated Ray Morrogh in Fairfax with messages focused on racial inequities in the criminal justice system and excessive incarceration as a problem both national and local.

“The results are going to send such a message to the rest of the country,” said former Virginia governor Terry McAuliffe (D), who supported both challengers. “It’s a great message of who Virginia is; we’re righting many of the wrongs of the past.”

Across the country, like-minded candidates have begun taking over prosecutors’ offices — many of them buoyed, as Dehghani-Tafti and Stamos were, by huge infusions of cash from billionaire George Soros. Critics, including police, have pushed back on their policies as dangerously lenient.

The movement, first sparked in urban areas struggling to handle both high crime and community distrust, is spreading to suburbs where most voters express contentment with law enforcement.

Miriam Krinsky, executive director of the advocacy group Fair and Just Prosecution, estimated more than three dozen left-leaning prosecutors had been elected across the country in recent years.

“What yesterday’s results reflect is a growing new normal in the world of prosecutions,” Krinsky said. “We’re seeing communities more and more and voters more and more who are tired about the old thinking in the criminal justice system.”

Dehghani-Tafti, a former public defender who in recent years worked on exoneration cases for the Mid-Atlantic Innocence Project, and Descano, a former federal tax prosecutor, have promised to use their discretion to no longer prosecute marijuana possession, ask for cash bail or pursue the death penalty. They said they would expand efforts to keep nonviolent offenders out of jail and charge in ways that lead to lower sentences across the board.

Both Arlington and Fairfax are overwhelmingly Democratic, and Dehghani-Tafti faces no challenger in the November general election. Jonathan Fahey, a federal prosecutor whose mother served as an Arlington prosecutor and a U.S. attorney, has qualified to run as an independent candidate in Fairfax.

If Dehghani-Tafti and Descano are elected in the fall, the candidates will be closely watched locally and nationally as they attempt to overhaul what justice looks like in Northern Virginia.

Both are thinking about how they would implement their promised changes, saying public safety can be achieved with less punitive approaches.

Dehghani-Tafti has planned to travel to jurisdictions that have set up ambitious diversion programs “to see what others are doing and what works.” She has contacted a nonprofit organization that works on alternatives to cash bail.

“There’s now a network of commonwealth’s attorneys and prosecutors who are working on this,” she said. “I’m not alone out there.”

Descano said he would first “focus in on transparency” by bringing in an outside organization to collect data on cases that come through the office.

“We want data at every point in prosecutorial process on a defendant’s race, economic level and where they live in the county,” he said.

Neither has plans to fire career prosecutors.

“I don’t take the institutional knowledge and the lived experience of the people who are already in the office lightly,” Dehghani-Tafti said. Descano agreed, saying he respects “the knowledge and dedication the prosecutors bring to the job.”

But, he added, “the question is, can these individuals can get on the program with reform?”

Stamos said she is working on making the transition smooth and on running her office for the next six months, which probably will include a challenging murder trial. She said she is also streamlining discovery for defense attorneys, a major point of contention between her office and local lawyers.

Stamos said that office was wrongly portrayed in the campaign as retrograde rather than effective.

“People are engaged in wrongdoing, and they need to be held accountable,” she said. “People, I guess, don’t want people to be prosecuted, but that’s not what keeps the community safe.”

Ben Tribbett, a campaign consultant for Morrogh, said the prosecutor is at home resting today after being hospitalized for an illness for several days. Tribbett said Morrogh, who has served as a prosecutor in Fairfax since the 1980s, would not immediately give interviews about the race.

Police in Fairfax expressed disappointment at Morrogh’s loss.

“We believe that policies [Descano] ran on will lead to higher crime and more de-policing in Fairfax County,” the executive board of the Fairfax chapter of the Virginia Police Benevolent Association said in a statement.

Police representatives in Arlington declined to comment, but before the primary, Matt Martin, former president of the Arlington Police Beneficiary Association, said he believed Dehghani-Tafti was wrongly forcing a national perspective on Arlington law enforcement.

“When she says ‘mass incarceration’ — we don’t do that,” he said. And he bristled at the implication that there is implicit or explicit racial bias in the local criminal justice system. “Show me the evidence that we are consciously identifying people’s race and then stopping them because of their race,” he said.

Supporters of the incumbents also lamented the unprecedented level of money that flowed into the contests. Soros’s Justice & Public Safety PAC donated more than $1 million to the challengers.

“This episode has magnified on a gross scale why we need to limit supersize donations,” said state Sen. Chap Petersen (D-Fairfax), who endorsed Morrogh. “It’s a perversion of democracy.”

Petersen said he planned to introduce a bill during the next session of the legislature that would cap donations from individuals at $10,000 per election cycle and $20,000 per political action committee. Petersen has introduced versions of the bill but has not gotten it passed.

Supporters of the victors were unmoved, saying the money merely made it possible for non-incumbents to make their voices heard.

“Change comes at different paces in different localities, and sometimes it doesn’t come much at all,” said Andy Elders, a deputy public defender in Fairfax who is part of a group advocating reform, Justice Forward. “But I do hope that prosecutors all over Virginia appreciate that people are going to have their say and that they’re accountable.”