The Democratic contender in the Senate race in North Dakota, Heidi Heitkamp, narrowly defeated her Republican rival Rick Berg in the last undecided US Senate election in the nation, unofficial returns showed.
The outcome of Tuesday's race capped a disappointing night for Senate Republicans, who had hoped to make a net gain of four seats to take the majority. They ended up losing two seats to Democrats in Indiana and Massachusetts, and a third to an independent in Maine.
Republicans had counted on winning the senate seat in North Dakota after Democratic Senator Kent Conrad announced he was retiring after 26 years.
Heitkamp prevailed by nearly 3,000 votes, or just under 1 per cent, out of nearly 320,000 votes cast, according to unofficial state election returns. Democrats now rule the Senate 55-45, counting two independents expected to align with them.
Control of the Senate virtually ensures that Obama's signature legislative achievement, his health care overhaul, will be fully implemented in 2014. Republicans had promised to repeal it.
More than US$2 billion was spent on the nasty fight for Congress. All 435 House seats were also on the ballot, and Republicans retained control there, though Democrats made a few gains. With most races decided, the new House looked like it would resemble the current one, which Republicans control by 240-190, with five vacancies.
While Republican Paul Ryan lost the vice-presidency, he did win another term to his Wisconsin House seat.
It was a good night for the Republicans in the race for governors' houses, winning North Carolina to take control of at least 30 US statehouses, the most in more than a decade.