Fairfax County’s top prosecutor is taking the unusual step of endorsing an independent to replace him in November’s general election, not the Democrat who beat him in the party’s primary earlier this year.

Commonwealth’s Attorney Raymond F. Morrogh is throwing his support behind former federal prosecutor Jonathan Fahey, who has praised Morrogh and said he will largely continue his moderate approach to criminal justice issues.

The endorsement is a boost for Fahey, who is running against another former federal prosecutor and Democrat, Steven T. Descano.

Descano narrowly edged out Morrogh in the Democratic primary in June with a promise to bring liberal reforms to the prosecutor’s office, such as dropping cash bail, ending use of the death penalty and halting prosecutions for marijuana possession.

The race between Descano and Morrogh grew heated and personal at times.

Descano’s campaign got a major push via hundreds of thousands of dollars in expenditures by a political action committee funded by Democratic megadonor George Soros, who has spent millions trying to elect prosecutorial candidates pushing a reform agenda across the country.

Fahey “embodies all the values that make for a good prosecutor and person: honesty, integrity, humility, knowledge and experience,” Morrogh said in a statement. “These are the values that are essential to keep Fairfax County one of the safest counties in our nation for its size. There is no place at the Commonwealth’s Attorney’s Office for politics.”

Morrogh’s endorsement is the latest of many for Fahey from the criminal justice establishment in Northern Virginia.

He has been endorsed by outgoing Arlington prosecutor Theo Stamos (D) and retiring Prince William County Commonwealth’s Attorney Paul B. Ebert (D), among others. Fahey also has received the backing of Fairfax County police unions.

Descano has picked up endorsements from major Virginia Democratic figures such as former governor Terry McAuliffe and Attorney General Mark R. Herring, as well as a handful of liberal organizations, including the political action committee Real Justice.

Members of the Fairfax County Democratic Party are forbidden from supporting anyone opposing a Democrat in a race, but an official said Morrogh submitted his resignation from the party last week.

Fahey has raised about $103,000 for the general election, while Descano has taken in about $52,000, according to campaign finance reports filed last week. Descano has not received any contributions from Soros-aligned political action committees during this funding cycle.

Fahey said he will focus on gang violence, the opioid crisis and forging a strong relationship with police. He has called Descano’s agenda “radical” and said it will make Fairfax County less safe.

“Ray has really epitomized what you want in a public servant,” Fahey said. “My goal would be to continue all the great things they are doing. They’ve been very innovative with veterans, mental health and drug court. They have been very good at keeping the community safe but also find new ways to do that.”

Descano has sought to link Fahey to President Trump — Fahey served in the Justice Department under the current administration — and has said the independent’s values are out of step with liberal Fairfax County.

“My opponent is so out-of-touch he sought the endorsement of Ray Morrogh, a scorned Democrat who resigned from the party less than a year after joining and lost the support of Fairfax voters,” Descano said in a statement. “My opponent’s support base has the same regressive values that caused voters to reject Mr. Morrogh at the ballot box.”

In recent months, Descano created unease among some Fairfax County prosecutors when he sent an email to some of them in August with the subject line, “The future of the office.”

Descano asked prosecutors to get in touch with him to discuss their future employment. Some said they thought the email was presumptuous given that the general election has not yet taken place and worried their jobs might be at risk.

“The email was immediately brought to my attention by several assistants who were distraught and felt bullied by the author,” Fairfax County Chief Deputy Commonwealth’s Attorney Casey M. Lingan wrote in an email to The Washington Post. Lingan has endorsed Fahey.

Descano said that there was nothing wrong with the email and that he was forced to reach out to prosecutors personally because Morrogh did not respond to calls.

“If you take an objective look at the language of this email — I took pains to ensure that no one thought it was an ultimatum,” Descano said in a statement.