David Soares, who is seeking his fifth term as Albany County district attorney, held a slim lead over first-time challenger Matt Toporowski in the Democratic primary Tuesday night, with mail-in votes still left to be counted.

According to the Albany County Board of Elections, Soares led by more than 1,100 votes in Primary Day balloting. Voters, however, had already been casting ballots through early voting, and the final tally had not been determined as of Wednesday afternoon.

The unofficial tally placed Soares at 7,218 votes, or 53.5% of the total, compared to Toporowski's 6,077, with more than 99% of precincts reporting.

The Times Union in Albany reported that the county sent out about 28,000 absentee ballots and had received 17,390. It would take about a week for all the mail-in votes to be counted, the paper said.

Soares ran unopposed in the 2016 Democratic primary, but beat Lee Kindlon, his Democratic opponent in the 2012 election, with about 15,500 of nearly 27,200 votes cast.

The county BOE did not respond to a request for comment on Wednesday.

The race between a Democratic Party establishment figure and a progressive reformer has been seen as a virtual referendum on criminal justice reform at a time when thousands of protesters in New York and across the country have taken to the streets to demand increased accountability by law enforcement and foundational changes to systems of policing, particularly in dealing with Black Americans.

Soares, first elected in 2004, has embraced the mantle of a tough-on-crime prosecutor, while also touting a record that has included declining to prosecute low-level marijuana crimes and a push toward "nontraditional means" of reducing street crime.

"While being tough on crime, I have led the fight on smart reform, making sure our laws are equal regardless of your economic status. This hard work has resulted in the reduction of both local and state prison populations, proving that you can improve public safety while addressing mass incarceration," Soares said in a statement posted to his campaign website.

Toporowski, a former assistant in Soares' office, has said that he became disillusioned with his former boss' approach to matters of criminal justice. His policies include harm reduction and diversion strategies that would prioritize treatment and alternatives to prosecution over punishment and prison.

The ultimate goal, Toporowski argued, would be to create a DA's office that is a "champion for racial justice," ending mass incarceration and transferring power to the community.

In a statement to his supporters Tuesday night, Toporowski characterized the election as a "horse race" and vowed to keep up the fight.

"Let's keep going. Let's see what comes in," he said. "We put the hard work in, and regardless of the results, we're going to keep pushing forward for criminal justice reform, regardless of what happens."

Across the country, local DA elections have attracted national attention for their ability to sway power over a number of levers in the criminal justice system, from how to handle minor crime to prosecuting police misconduct.

Last year, first-time candidate Tiffany Cabán nearly beat out former Queens Borough President Melinda Katz in the Democratic primary for Queens DA with the backing of U.S. Rep. Alexandria Ocasio-Cortez, D-New York; U.S. Sen. Bernie Sanders, I-Vermont; U.S. Sen. Elizabeth Warren, D-Massachusetts, and progressive Philadelphia DA Larry Krasner.

In this year's Albany County race, Toporowski had secured high-profile endorsements from former New York gubernatorial candidate Cynthia Nixon and Grammy Award-winning recording artist John Legend.

Soares, meanwhile, had the backing of many within the local political establishment, including former Albany Mayor Jerry Jennings, Albany County Sheriff Craig Apple and state Assembly members Pat Fahy and John McDonald.