US Republicans have won a closely contested congressional election in Georgia seen by many as a referendum on Donald Trump’s presidency.
Karen Handel retained the Atlanta seat with 53% of the vote, against 47% for her Democratic rival Jon Ossoff.
The vacancy arose when Tom Price left to become health secretary. He had won the seat with a 23 point lead.
In South Carolina, Republican Ralph Norman beat Democrat Archie Parnell in a solidly conservative area.
President Trump congratulated both candidates.
On the victory in suburban Atlanta, he tweeted: “Congratulations to Karen Handel on her big win in Georgia 6th. Fantastic job, we are all very proud of you!”
Georgia’s sixth district is a traditionally safe Republican seat but Democrats had hoped to capitalise on the president’s low approval ratings.
Spending on candidates was put at $ 56m (£44m), making it the costliest congressional election in US history.
Democrats have already suffered narrow defeats in Kansas and Montana this year.
Addressing jubilant supporters, Ms Handel thanked key Republican figures, including President Trump.
“I need to also thank Speaker Ryan and the House leadership and so many of the members across this country. And a special thanks to the President of the United States of America,” she said.
Mr Ossoff told his supporters they had provided “a beacon of hope for people here in Georgia, for people across the country, and for people around the world”.
He also said they should celebrate having turned a conservative stronghold into a competitive district.
“We showed the world that in places where no-one thought it was even possible we could fight,” Mr Ossoff said.
In April, he narrowly failed to win the 50% needed to secure outright victory in a first round, forcing the run-off against Ms Handel.
She had come a distant second in the first round, but the Republican vote had been split among 11 candidates.
Republicans believed the run-off would favour them in an affluent seat they have held since 1979.
They also believed that last week’s shooting of Republicans on a Virginia baseball field would count in their favour at the polls.
The suspected gunman was a Democratic supporter and a Republican advert that sought to politicise the attack was condemned by Ms Handel.
The South Carolina fifth-district seat, vacated when Mick Mulvaney became Mr Trump’s budget director, had been expected to be an easy win for Republicans.
The Republicans have so far staved off defeats by the Democrats this year.
In April they narrowly defended a deeply conservative Kansas seat vacated when Mr Trump appointed Congressman Mike Pompeo to lead the CIA.
Last month, Republican Greg Gianforte won a special congressional election in Montana, despite being charged with assaulting a UK reporter.