Marc Elrich is declaring victory in the race to be the Democratic candidate for Montgomery County Executive. The Board of Elections finished counting votes and Elich has an 80 vote lead, but there could still be recounts.

WASHINGTON — The counting is done in the race for Montgomery County Executive, and only 80 votes separate the two Democratic candidates.

The count ended with 37,529 votes for Montgomery County council member Marc Elrich and 37,449 for businessman David Blair, according to Montgomery County’s election results. The deadline to certify the votes is July 16.

The primary election happened on June 26 but the count recently finished Sunday in Montgomery County to determine whether it will be Elrich or Blair who will be the Democratic candidate in November.

Vote-counters went through more than 5,000 provisional and absentee ballots over the weekend. Blair narrowed the lead Saturday after provisional ballots were counted.

By Sunday night, some 974 ballots were up for rejection — the last remaining to be counted, Montgomery County Board of Elections spokesman Marjorie Roher said in an email.

“We had six talented candidates, all with experience and a vision for Montgomery County’s future. So much is at stake that it really matters who wins,” said Maryland state Sen. Cheryl Kagan, who sat in as on observer on Thursday while canvassers tallied the provisional ballots.

A recount could be requested by candidates, but depending on a number of factors, the campaign of the petitioner could have to foot the bill.

There are a few cases in which a candidate asking for a recount would be relieved of the cost: If the results of the recount flip the results and change the outcome of the race; if the petitioner sees an increase of 2 percent or more of the total votes cast; or if there’s a less than 0.1 percent difference of the total votes cast for the candidates.

WTOP’s Kate Ryan contributed to this report.