A first-term member of the ultra-conservative House Freedom Caucus, won his first primary as an incumbent on Thursday evening.

Rep. Andy Ogles, R-Tenn., fended off a challenge from Nashville Metro Council member Courtney Johnston, who ran a more moderate campaign compared to the freshman Republican.

It was a much-needed political victory for the Freedom Caucus this election cycle after its chairman, Rep. Bob Good, R-Va., narrowly lost re-election in June and is facing long odds in a recount held Thursday.

HEAD HERE FOR THE LATEST FOX NEWS REPORTING ON THE 2024 ELECTIONS

Rep. Andy Ogles

Rep. Andy Ogles is battling it out in his first primary re-election race. (Getty Images)

Good had been facing Republican challenger John McGuire, who was backed by House GOP national security hawks like House Armed Services Committee Chairman Mike Rogers, R-Ala., and Reps. Jen Kiggans, R-Va.; and Ryan Zinke, R-Mont., among others.

Johnston had narrowly outraised Ogles, according to financial disclosures. Her receipts through July 12 show her raising nearly $785,000 in individual contributions compared to Ogles’ total – just over $500,000.

She also tried to tie him to Good and seven other Republicans’ successful effort to oust ex-Speaker Kevin McCarthy, R-Calif., last October – though Ogles was not one of the eight who voted to end McCarthy’s leadership.

THIS REPUBLICAN CONGRESSMAN FILES IMPEACHMENT ARTICLES AGAINST VICE PRESIDENT HARRIS, AGAIN

Rep. Bob Good speaks at press conference

House Freedom Caucus Chair Bob Good is fighting for his political life in a recount on Thursday. (Kevin Dietsch/Getty Images)

"I think the incumbent has caused chaos. The ouster of McCarthy was an absolute abomination, really. Not only for the Republican Party, but really for Congress as a whole," she told local outlet WPLN.

Ogles had the backing of top national Republicans, however, including former President Trump and Speaker Mike Johnson, R-La.

"Andy is working hard to Grow the Economy, Stop Inflation, Secure our Southern Border, Uphold the Rule of Law, and Defend our Second Amendment," Trump wrote on Truth Social in May. "I was proud to help Andy flip a Democrat seat in 2022, and he has my Complete and Total Endorsement for re-election. He will not let you down!"

BIDEN ENDS BID FOR SECOND TERM IN WHITE HOUSE AS HE DROPS OUT OF HIS 2024 REMATCH WITH TRUMP

Donald Trump arrives to Trump Tower after being found guilty

Ogles was endorsed by former President Trump. (Felipe Ramales for Fox News Digital)

Ogles won Tennessee’s 5th Congressional District in November 2022 after its boundaries were changed to include less of Nashville's city center, which had previously made it a solidly blue seat.

CLICK HERE TO GET THE FOX NEWS APP

Under its current lines, however, the seat leans red – residents of the district voted for Trump over President Biden in 2020 by just over 10 points.

Ogles defeated his Democratic challenger in 2022 by similar margins.