California Democrat Pete Aguilar and his allies are claiming victory after the latest round of counted votes finds him clinging to a narrow second place lead in a key House district's top-two primary.

While Republican Paul Chabot finished first in Tuesday's primary, the fight for second is critical to both parties. Aguilar, the mayor of Redlands, leads Republican former Hill staffer Lesli Gooch (R) by 183 votes after the final mail-in votes were tallied in the district, though outstanding provisional and damaged ballots remain to be counted.

If he advances, Democrats avoid repeating the nightmare outcome that happened two years ago for the party, where two Republicans advanced to the general election in the Democratic-leaning district to succeed retiring Rep. Gary Miller (R). 

Gooch has not conceded, however, and the vote totals won't be fully finalized until early July. More than 5,000 votes remain uncounted in sprawling San Bernardino County, of which the district makes up about one third of the population.

"We did it!" Aguilar's campaign declared to supporters in a Thursday evening email.

The Democratic Congressional Campaign Committee, which backed Aguilar in the crowded all-candidate primary, also declared victory.

"I congratulate Redlands Mayor Pete Aguilar for advancing to the general election tonight in California’s 31st district, because the people of this district know Pete will fight for their values," Democratic Congressional Campaign Committee Chairman Steve Israel (N.Y.) declared in a statement.

Aguilar barely edged Gooch and EMILY's List-backed attorney Eloise Gomez Reyes (D), while former Rep. Joe Baca (D-Calif.) also siphoned off Democratic votes in the district. Gomez Reyes conceded Thursday night following the latest vote count. If Aguilar does end up advancing to the general election, he'll start off with an edge in the Democratic-leaning district against Chabot.