California’s 48th Congressional District was a fight to the finish as Republican incumbent Rep. Dana Rohrabacher attempted to defend the seat he has held since 1989.

Ultimately, Rohrabacher was unable to close the deal, losing his seat after spending much of the race in a statistical dead heat with his Democratic challenger, tech entrepreneur Harley Rouda. The race was so close that the Associated Press did not officially call Rouda the winner until Saturday, four days after the final ballots were cast.

Rohrabacher, a former speechwriter and special assistant to President Ronald Reagan, was reportedly on President Donald Trump’s short list for Secretary of State at the beginning of his administration, a position that was eventually given to Rex Tillerson. (RELATED: Rohrabacher Is Still Ahead In California Despite Bloomberg’s Spending Spree)

Rouda, in contrast, campaigned on the fact that he is not a politician, saying that he was inspired to run because nothing was getting done in Washington. He supports a “living wage,” bringing green jobs to Orange County and working to combat the threat of climate change.

Going into last Tuesday’s midterm election, Real Clear Politics still classified the race as a toss-up.

Follow Virginia on Twitter.