Democrat Josh Harder has defeated Rep. Jeff Denham Jeffrey (Jeff) John DenhamBottom line Bottom line Lobbying world MORE (Calif.), a week after the midterm elections were held, knocking off a Republican long seen as vulnerable.

The Associated Press called the race for Harder on Tuesday night.

"This has been a hard fought campaign and we congratulate Congressman Denham and his family for his service to our nation in the military and to this district in Congress," Harder said in a statement.

"Now that it’s over, I pledge to be a member of Congress for this entire district regardless of political party, regardless of who you voted for," he added. "Washington is broken because our leaders have put party over country — I pledge that I will always put this community before anything in Washington."

ADVERTISEMENT

Denham had sought to distance himself from President Trump Donald John TrumpBiden on Trump's refusal to commit to peaceful transfer of power: 'What country are we in?' Romney: 'Unthinkable and unacceptable' to not commit to peaceful transition of power Two Louisville police officers shot amid Breonna Taylor grand jury protests MORE on immigration, helping to launch the upstart effort from moderate Republicans to force votes on legislation protecting “Dreamers,” undocumented immigrants brought to the country illegally as kids, even as GOP leaders were fighting to keep the issue off the floor.

Denham’s discharge petition gambit ultimately failed, however, as conservatives maneuvered successfully to block votes on any Dreamer bill with a chance of passing. The defeat of efforts to prop up the Deferred Action for Childhood Arrivals program — an Obama-era initiative Trump has fought to dismantle — has left an uncertain future for Dreamers, while putting Denham in the unenviable position of claiming success in failure. The issue may have resonated in California’s 10th District, where 34 percent of eligible voters are Hispanic.

Harder, a 32-year-old investment banker, had focused on those issues where Denham had toed the party line, particularly his votes in favor of repealing ObamaCare and overhauling the tax code.

Denham also faced an energized Democratic base, which funneled $7 million to Harder’s campaign over the cycle — a vast advantage over Denham’s $4.4 million, according to the Center for Responsive Politics.

Updated at 10 p.m.