SACRAMENTO (AP) — Democratic Rep. Ami Bera has won a hard-fought re-election to a congressional seat in the Sacramento area that was the nation’s most expensive House race this year.

A physician who won the 7th Congressional District seat from a Republican two years ago, Bera held an edge of more than 1,400 votes Wednesday out of more than 183,000 ballots cast.

The Associated Press called the race for Bera after determining that his Republican challenger, former Congressman Doug Ose, could not make up the difference with the 4,300 provisional ballots that remained to be counted.

The race became the nation’s most expensive congressional race with $19.6 million in total spending.

It was the last California congressional race to be called. Earlier Wednesday, Democratic Rep. Jim Costa was re-elected to a sixth term.