Handel’s win avoids Democratic upset by Jon Ossoff in most expensive House race in US history.

Republican Karen Handel has won a closely contested congressional race, salvaging a seat in conservative US state of Georgia where Democrats had hoped to strike a blow against Donald Trump‘s presidency.

Returns showed Handel, a former Georgia secretary of state, winning about 52 percent of the vote over Democrat Jon Ossoff, who won nearly 48 percent in Georgia’s 6th Congressional District.

“A special thanks to the president of the United States of America,” she said late on Tuesday night as her supporters chanted “Trump! Trump! Trump!”.

Handel, 55, will become the first Republican woman to represent Georgia in the US House of Representatives, according to state party officials.

READ MORE: Reporters face 70 years in prison over anti-Trump march

The election, however, will not significantly change the balance of power in Washington, where Republicans control the White House and both chambers of Congress.

Handel’s win comes as a relief for the Republicans who were concerned about whether their party, buffeted by the scandals that have plagued the Trump presidency, could hold the seat after what became the most expensive House race in US history.

Spending on the election reached at least $57m, nearly twice the previous record, according to the Center for Responsive Politics, a watchdog.

Republicans immediately crowed over winning a seat that Democrats spent $30m trying to flip.

“Congratulations to Karen Handel on her big win in Georgia 6th. Fantastic job, we are all very proud of you!” President Trump tweeted.

“Democrats from coast-to-coast threw everything they had at this race, and Karen would not be defeated,” House Speaker Paul Ryan said in a statement.

Tight race

Democrats celebrated the fact that they had turned a conservative stronghold into a competitive district.

Republicans have held the Georgia seat since 1979.

Taking the stage after conceding the race, Ossoff told his supporters his campaign “showed the world that in places where no one thought it was even possible we could fight [that] we could fight”.

Trump’s party also claimed victory in another congressional race on Tuesday, in neighbouring South Carolina. Both contests were held to replace legislators who vacated their seats in order to join the Trump cabinet.

Democrats are zero for 4 in congressional elections this year, having earlier lost races to fill vacant seats in Kansas and Montana.

READ MORE: Georgia election a ‘wake-up call’ for US Republicans

Ossoff signalled Democrats could learn from these races and prepare for the larger battle for control of the US Congress in 2018.

“This is not the outcome many of us were hoping for,” Ossoff said. “But this is the beginning of something much bigger than us.”