Republicans are closing in on a narrow majority in the US House of Representatives while control of the Senate hinged on a series of tight races in a midterm election that defied expectations of sweeping conservative victories driven by frustration over inflation and President Joe Biden’s leadership.
Either party could secure a Senate majority with wins in both Nevada and Arizona – where the races were too early to call.
But there was a strong possibility that, for the second time in two years, the Senate majority could come down to a run-off in Georgia next month, with Democratic Senator Raphael Warnock and Herschel Walker failing to earn enough votes to win outright.
In the House, Democrats kept seats in districts from Virginia to Kansas to Rhode Island, while many in states such as New York and California had not been called.
But Republicans notched several important victories in their bid to get to the 218 seats needed to reclaim the House majority.
In a particularly symbolic victory, the Republicans toppled House Democratic campaign chief Sean Patrick Maloney of New York.
Control of Congress will be a key factor in determining the future of Mr Biden’s agenda and serve as a referendum on his administration as the nation reels from record-high inflation and concerns over the direction of the country.
A Republican House majority would be likely to trigger a spate of investigations into Mr Biden and his family, while a Republican Senate takeover would hobble the president’s ability to make judicial appointments.
Democrats, though, saw candidates who prioritised protecting abortion rights after this summer’s Supreme Court decision overturning the landmark Roe v Wade court decision, perform well.
The party won governors’ races, winning in Wisconsin, Michigan and Pennsylvania – battlegrounds critical to Mr Biden’s 2020 win over Donald Trump.
But Republicans held on to governors’ mansions in Florida, Texas and Georgia, another battleground state Mr Biden narrowly won two years ago.
Though neither party had yet secured a majority in either congressional chamber, the midterms did not feature a strong Republican surge, which was uplifting for Democrats who had braced for sweeping losses – and raised questions about how big the Republicans could hope their possible majority might be.
“As we sit here I can’t, with 100% certainty, tell you who holds the House majority,” said Mr Maloney, whose defeat marks the first time since 1980 the head of the Democratic House campaign arm has been defeated.
“If we fall a little short, we’re going to know that we gave it our all and we beat the spread.”
Democrats had faced historic headwinds.
The party in power almost always suffers losses in the US president’s first midterm elections, but Democrats bet that anger from the Supreme Court’s decision to gut abortion rights might energise their voters to buck historical trends.
In Pennsylvania, Democrats won the governorship and Senate in the key battleground state.
Lt Gov John Fetterman, who suffered a stroke five months ago, flipped a Republican-controlled Senate seat, topping Trump-endorsed Republican Dr Mehmet Oz.
In the governor’s race, Democratic attorney general Josh Shapiro beat Republican Doug Mastriano, an election denier who some feared would not certify a Democratic presidential win in the state in 2024.
Georgia, meanwhile, was set for yet another run-off on December 6.
In 2021, Mr Warnock used a run-off to win his seat as did Democratic Senator Jon Ossoff – which gave Democrats control of the Senate.
Both Mr Warnock and Mr Walker were already fundraising off the race stretching into a second round.
Both Republicans and Democratic incumbents maintained key Senate seats.
In Wisconsin, Republican Senator Ron Johnson prevailed over Democratic Lt Gov Mandela Barnes, while in New Hampshire, Democratic Senator Maggie Hassen beat Don Bolduc, a retired army general who had initially promoted Mr Trump’s lies about the 2020 election but tried to shift away from those views closer to election day.
In top governor’s races, Democrats Tony Evers in Wisconsin, Gretchen Whitmer of Michigan, Laura Kelly of Kansas and Kathy Hochul of New York all won.
So did Republican incumbents including Brian Kemp of Georgia, Texas governor Greg Abbott and Florida governor Ron DeSantis, who is expected to run for president in 2024 and could be a major Republican primary challenger to Mr Trump.
The Republican Party was still hoping to knock off Democrat Tina Kotek in Oregon’s three-way governor’s race.
AP VoteCast, a broad survey of the national electorate, showed that high inflation and concerns about the fragility of democracy were heavily influencing voters.
Half of voters said inflation factored significantly, with groceries, petrol, housing, food and other costs that have shot up in the past year.
Slightly fewer – 44% – said the future of democracy was their primary consideration.
Mr Biden did not entirely shoulder the blame for inflation, with close to half of voters saying the higher-than-usual prices were more because of factors outside of his control.
And despite the president bearing criticism from a pessimistic electorate, some of those voters backed Democratic candidates.
Mr Biden spent the night calling Democrats to congratulate them on their wins and was holding a late Wednesday afternoon news conference at the White House.
Democrats were betting on a midterm boost after the Supreme Court overturned the landmark Roe v Wade ruling guaranteeing a constitutional right to an abortion – and there were signs the issue may have provided one.
Voters in reliably red Kentucky rejected a ballot measure aimed at denying any constitutional protections for abortion.
Voters in the swing state of Michigan voted to amend their state’s constitution to protect abortion rights.
The result mirrored what happened in another red state, Kansas, where voters in August rejected changing that state’s constitution to let legislators tighten restrictions or ban abortions.
Voters in the swing state of Michigan, meanwhile, voted to amend their state’s constitution to protect abortion rights.
VoteCast showed that seven in 10 national voters said overturning the 1973 Roe v Wade decision was an important factor in their midterm decisions.
It also showed the reversal was broadly unpopular.
And roughly six in 10 say they favour a law guaranteeing access to legal abortion nationwide.
There were no widespread problems with ballots or voter intimidation reported around the country, though there were hiccups typical of most election days.
In the first national election since the January 6 insurrection, some who participated in or were in the vicinity of the attack on the US Capitol were poised to win elected office.
One of those Republican candidates, Derrick Van Orden in Wisconsin – who was outside the Capitol during the deadly riot – won a House seat.
Another, JR Majewski, lost to Ohio Democratic Representative Marcy Kaptur.
Democratic Representatives Abigail Spanberger and Jennifer Wexton held off spirited Republican challengers in Virginia districts the Republicans had hoped to flip.
The 2022 elections are on track to cost a projected 16.7 billion dollars (£14.7 billion) at the state and federal level, making them the most expensive midterms ever, according to the non-partisan campaign finance tracking organisation OpenSecrets.
Mr Trump lifted Republican Senate candidates to victory in Ohio and North Carolina.
JD Vance, the bestselling author of Hillbilly Elegy, defeated 10-term congressman Tim Ryan, while Representative Ted Budd beat Cheri Beasley, the former chief justice of the state Supreme Court.
Mr Trump had endorsed more than 300 candidates across the country, hoping the night would end in a red wave he could ride to the 2024 Republican presidential nomination.
After summoning reporters and his most loyal supporters to a watch party at his Mar-a-Lago club in Florida on Tuesday, he ended the night without a triumphant speech.
Still, the former president insisted on social media that he had had “A GREAT EVENING”.
Hours later, Palm Beach County issued an evacuation order for an area that included Mr Trump’s club with Tropical Storm Nicole approaching.
Comments: Our rules
We want our comments to be a lively and valuable part of our community - a place where readers can debate and engage with the most important local issues. The ability to comment on our stories is a privilege, not a right, however, and that privilege may be withdrawn if it is abused or misused.
Please report any comments that break our rules.
Read the rules here