Republican Rep. David Valadao conceded to Democratic challenger TJ Cox on Thursday, ending a tight race and delivering another major blow to California Republicans. 

Cox confirmed that Valadao called him to announce his concession in the Nov. 6 election for the 21st Congressional District seat.

“I’m thankful for his six years of service,” Cox tweeted. “As the congressman knows well, it is a great honor to represent #CA21. We will work together to ensure a smooth transition for our constituents.”

In a statement, Valadao described his time in Congress as “the honor of a lifetime.”

Cox’s win in central California’s San Joaquin Valley marks an incredible feat: Democrats have flipped every Republican-held seat in the state’s districts that had voted for Democratic nominee Hillary Clinton in the 2016 presidential election.

Overall, Democrats now have a net gain of 40 seats in the House of Representatives.

After election night, Valadao, who has served three terms in Congress, was projected to be the winner with almost 5,000 votes over Cox, The Fresno Bee reported. National news outlets, including The Associated Press and CNN, called the race in Valadao’s favor.

However, mail-in votes that were postmarked by Election Day and counted in the weeks following the election put Cox in the lead by 862 votes, according to Roll Call.

Cox thanked his family and volunteers in a statement released after his win was announced.

“Even when the outlook may have seemed dim, they never gave up,” Cox said.

“This campaign was fueled by their energy and passion to make a positive difference in the lives of the hard-working people here in the Central Valley,” he added. “Voters across the district resonated with our message of expanding health care, creating good jobs and fighting for our families’ futures.”