(CNN) Republican Rep. David Valadao conceded to Democrat TJ Cox in the race for California's 21st District on Thursday, giving the Democratic Party a net gain of 40 seats in the US House of Representatives.

In a statement, Valadao thanked his supporters and said it had been an "honor of a lifetime" to serve his constituents in California.

"There is no doubt we are disappointed in the results but we can take pride in knowing that we brought about real, tangible change," Valadao said in the statement. "We have reduced taxes for middle class families, made huge strides in our battle for water, reformed the dairy industry for thousands of California farmers, improved access to healthcare for families throughout the Valley, and given our troops the support they deserve."

Several national news outlets, including CNN, had previously projected the race for Valadao. However, vote reports after election night tightened the margin significantly and eventually put Cox in the lead.

Of all the California GOP members up for re-election in districts won by Hillary Clinton in 2016, Valadao was viewed as the congressman with the best chance of holding his seat.

Read More