Democrat Ami BeraAmerish (Ami) Babulal BeraAmerica’s leadership needed in global health Lawmakers eye private moon missions Republicans look for California House wins in 2018 midterms MORE has defeated Rep. Dan Lungren (R-Calif.) in one of the closest House races of the cycle.

Bera and Lungren finished within a few hundred votes of one another on election night, but Bera's lead has grown in recent days as mail-in and provisional ballots were counted. He leads Lungren by slightly fewer than 4,000 votes with some ballots still left to be counted.

ADVERTISEMENT
The Associated Press called the race for Bera late Thursday evening.

The contest was a rematch between the two: Bera narrowly lost to Lungren in 2010, surprising observers with a better-than-expected performance and strong fundraising skills.

This cycle, Democrats made a major target of Lungren, a four-term lawmaker, spending heavily on Bera's behalf and bringing in former President Bill ClintonBill ClintonGOP rep: North Korea wants Iran-type nuclear deal Lawmakers, pick up the ball on health care and reform Medicaid The art of the small deal MORE to campaign for him. Republicans just as strongly supported Lungren.

Their contest featured a lot outside spending, with labor unions, super-PACs and the U.S. Chamber of Commerce all heavily involved.

The AP's call leaves five House races undecided: Reps. Ron BarberRonald (Ron) Sylvester BarberPrinciples and actions mean more than Jeff Flake’s words Giffords to lawmakers avoiding town halls: 'Have some courage' Ten House seats Dems hope Trump will tilt MORE (D-Ariz.) and Mike McIntyre (D-N.C.) hold narrow leads in their ballot counts; Rep. Allen West (R-Fla.) is disputing his race, where he trails by a few thousand votes; Rep. Brian Bilbray (R-Calif.) narrowly trails Democrat Scott Peters; and Reps. Charles BoustanyCharles William BoustanyControversial House Republican gains national attention after filming Auschwitz video Democrats, Republicans must work together to advance health care Lobbying World MORE Jr. (R-La.) and Jeff Landry (R-La.) are heading to early-December runoffs.

— This story was updated at 8:52 p.m.