Rep. David Valadao, R-Calif., conceded to Democrat TJ Cox in a hotly contested House race Thursday in another blow for California Republicans. Valadao's defeat gives Democrats a 40-seat net gain in the House.

Cox defeated Valadao by around 1,000 votes, with 50.3 percent of the vote to Valadao's 49.6 percent. The Associated Press had called the race for Valadao, but withdrew its call when mail-in ballots were counted in the weeks after the election.

"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, a three-term congressman, said in a statement. Cox said in a statement that when Valadao called to concede, he thanked him "and his family for their service to our country and our communities during the past six years."

Get Breaking News Delivered to Your Inbox

"As the Congressman knows well, it is a great honor to be chosen to represent the people of the 21st District in the House of Representatives. We will work together to ensure a smooth transition for our constituents," Cox said.

With Cox's victory, the seven Republican-held districts in California won by Hillary Clinton in the 2016 presidential election have flipped Democratic. The GOP now controls just seven of the state's 53 congressional districts. Valadao's loss is also a blow to California GOP Rep. Kevin McCarthy, the incoming minority leader when Democrats take the majority next year.

Democrats have won 22 of the 25 Republican-held districts that supported Clinton in 2016. The three remaining districts are held by Reps. John Katko of New York, Will Hurd of Texas and Brian Fitzpatrick of Pennsylvania.