A former Loudoun County sheriff’s deputy was charged Thursday with stealing more than $200,000 from the office’s asset-forfeiture program — an alleged crime authorities say spanned more than three years and became the subject of heated debate in the political race for Loudoun’s top law enforcement job.

Frank Pearson, 44, a veteran sheriff’s deputy who resigned amid an investigation into the matter, was charged in U.S. District Court in Alexandria with four counts of theft from programs receiving federal benefits. In an indictment, federal prosecutors alleged that Pearson embezzled money that was supposed to be deposited into an escrow account from the asset-forfeiture program. Pearson, who lives in Winchester, Va., had access to the money, seized vehicles and other assets because he ran the program, according to the indictment.

The indictment is the culmination of a years-long investigation that became a hot-button issue in Loudoun Sheriff Mike Chapman’s reelection campaign. The sheriff’s opponent in the Republican primary, retired Maj. Eric Noble, contended that the sheriff misleadingly claimed credit for uncovering the embezzlement and that — if his claim were true — he could have stopped the deputy sooner.

Chapman ultimately won the Republican nomination, but he faces a Democratic and an independent challenger in November’s general election. He asserted Thursday that his actions helped suss out the theft and that once he learned of it, he moved swiftly to call for an independent investigation and an overhaul of the asset-forfeiture program.

Loudoun County Sheriff Mike Chapman in his Leesburg office. (Tom Jackman)

“We restructured the system so this would never happen again,” Chapman said.

According to the indictment, Pearson took over the program in 2006 and embezzled from it from 2010 to October 2013 by making deposits to his own bank account. Authorities also alleged in the indictment that in October 2013, with co-workers on the verge of uncovering his misdeeds, Pearson simply walked off with several boxes of cash and coins.

Pearson was apparently well-liked in the agency, and news reports show that a deputy by his name earned a meritorious service award in 2011. Online court records show that he filed for bankruptcy in 1999. A number listed for him was disconnected, and it was not clear whether he had retained an attorney.

How the alleged misconduct came to light continues to be a source of debate in Loudoun political and law enforcement circles.

Chapman said Thursday that he “started putting a little pressure on the system” early in 2013 after noticing numerous seized vehicles in the narcotics unit, adding that when he reshuffled personnel in October of that year, a budget manager told him $34,000 was missing. He said the alleged theft was in part made possible by the asset-forfeiture system set up by his predecessor — former ­Loudoun sheriff Stephen O. Simpson, who is running this year as an independent — because it gave Pearson unchecked authority.

Simpson said Thursday that his system included checks and balances and that if Chapman did not like it, he could have changed it when he took office. He said any system was vulnerable if those filling out the paperwork were corrupt, and he said Pearson was “probably one of the last people I would have thought” would steal.

Noble said the budget manager — not Chapman — was the one to detect wrongdoing, and he noted sarcastically that if the sheriff’s visit to narcotics uncovered illicit activity, he could have stopped $50,000 from being taken.

The indictment alleges that discrepancies surfaced — though not at Chapman’s level — long before October 2013. In January 2012, for example, a budget manager found that more than $13,700 seized during a 2011 narcotics investigation appeared to be missing from the escrow account. The Loudoun County commonwealth’s attorney had decided to have the seized funds returned to the person from whom they were taken.

After the budget manager inquired with Pearson about the matter, the deputy allegedly shifted funds from other cases to come up with records of the money. Pearson had never deposited the more than $13,700 that was seized in 2011, according to the indictment.

Authorities alleged in the indictment that Pearson used a similar subterfuge in December 2012 in another case in which money was supposed to be returned to the person from whom it was seized. And in September 2013, authorities alleged that Pearson used a more straightforward deception: He simply told a supervisor that he had deposited more than $16,000 in seized funds that he hadn’t. When the supervisor suggested asking the bank about the discrepancy, Pearson said he could not find the number for his contact person there, and he later deposited money into the account, according to the indictment.

Chapman said he was unsure how the missing money would affect whose assets would be returned. The indictment seeks more than $230,000 in forfeiture from the former deputy, who is scheduled to be arraigned July 24.