Virginia’s longest-serving prosecutor announced Tuesday he will retire at the end of the year after serving more than 50 years leading the Commonwealth’s Attorney’s Office in Prince William County.

Paul B. Ebert, 81, is one of the state’s best-known legal figures, having presided over many high-profile prosecutions, from Beltway Sniper John Allen Muhammad to Lorena Bobbitt, the onetime wife of John Wayne Bobbitt. Over 13 terms, Ebert has sent more defendants to death row than any other prosecutor in Virginia’s history.

“I’ve always loved what I do, and it’s been a challenge to me,” Ebert said. “If it wasn’t for health problems, I would keep on cracking. My doctors have advised me not to run again.”

Ebert declined to detail his ailments but said he may discuss them publicly at a later date. He said he told his staff of his plans at an emotional meeting on Tuesday afternoon.

Ebert built a reputation as an uncompromising prosecutor and champion of victims, but in recent years, he has weathered controversies, particularly after a death penalty conviction against a drug dealer was overturned after a federal judge found Ebert’s office had withheld key evidence.

Ebert, a Democrat, took office in 1968 and in a very different Northern Virginia. Prince William County was still largely rural, not a bustling suburb. Ebert grew up in Falls Church and spent time on his grandfather’s farm, which sat on land that became Dulles International Airport.

Ebert said a cousin encouraged him to go into law, and he graduated from George Washington University Law School in 1963. He eventually took a job as an assistant prosecutor in Prince William County and then ran for commonwealth’s attorney, winning office for the first time in 1967.

In his early days as chief prosecutor, Ebert said, he dealt with just a handful of cases each month, mostly simple assaults and burglaries. But the caseload grew with Prince William County, expanding into more drug and murder cases by the early ’80s. Ebert estimates he’s tried thousands of cases over the years.

“He is very much the legend that everyone says he is,” said Arlington County Commonwealth’s Attorney Theo Stamos. “He is a good, decent and fair man. He has a real sense of service, a belief in the rule of law, a sense of fairness and a humility.”

Ebert said he’s contemplating writing a memoir in retirement, but he has not made any decisions about whom he will endorse to replace him. So far, Democrat Amy Ashworth is the only candidate who has officially announced her candidacy for the office, but other entrants are expected.

Ashworth, a private attorney and former prosecutor in Prince William County, both praised and criticized her former boss.

“I think Paul is a great man. He has served this county for a long time,” Ashworth said. “There hasn’t been leadership in the office for a long time.”

Ashworth said she would reorganize the office to ensure the most experienced attorneys are on the most important cases, create a unit that focuses on domestic violence and put together a team that handles juvenile cases.

Ebert said he had a “good ride” and praised his staff.

“A prosecutor has to be fair first and tough secondly,” Ebert said. “I got more pleasure out of helping somebody than being tough on them.”