Former Republican Rep. David Valadao reclaimed his seat in California's 21st District on Friday, narrowly defeating Democratic incumbent Rep. T.J. Cox. 

Valadao won in 2012 by focusing on local issues like agriculture, but Democrats -- including Cox -- came out swinging during the 2018 midterm elections and claimed seven GOP-held House seats in the Golden State.

GOP'S HOUSE WINS SHOW SOME DEM VOTERS 'CONNECTING THE DOTS' ON LIBERAL LEFT, LAWMAKER SAYS

The Hanford, Calif., native had previously withheld his endorsement of President Trump. This year, he changed strategies in a risky move that ultimately paid off in the Farm Belt. 

But Valadao also highlighted his independence during the race, criticizing the president over family separations at the nation's southern border.

He beat Cox by 862 votes.

As The Associated Press reported Friday, much of California's agricultural centers have been known for their Republican leanings, at variance with a largely blue state.

Rep. David Valadao, R-Calif., during his tenure in the House of Representatives. Valadao reclaimed his seat after losing to a Democrat in 2018. (Photo By Bill Clark/CQ Roll Call) (© 2015 CQ-Roll Call, Inc.)

Valadao himself is from a dairy farming family -- lineage that put him at the top of the pack in the spring. He accused Cox of aligning his ideals with those of Democratic progressives and promised to pass a COVID-19 relief package amid a raging pandemic. 

Valadao declared victory on Wednesday, calling for unity

“This Thanksgiving, as the coronavirus continues to spread and our community and nation struggle, we desperately need relief,” he said. “The only way we will get through this is by sticking together as Americans, not divided by political parties. When I head back to Washington every resident of the Central Valley has my word that I will continue to always put this community first.”

Cox reportedly has yet to concede the race.

Valadao's win marks another Republican triumph in the 2020 House races.

While Democrats had expected to make serious gains this year, conservative candidates shattered expectations.

Elsewhere in the state, Reps.-elect Young Kim and Michelle Steel also bested Democratic incumbents, and Rep. Mike Garcia flipped the state’s 25th District last week. 

CLICK HERE FOR THE FOX NEWS APP

Though Democrats have ultimately retained control of the House, their losses signaled a potential Republican-controlled House in 2022 and a possible foothold in a state where they have been sidelined for decades.