Opposition Republicans delivered a stinging blow to President Barack Obama, capturing the US House of Representatives in election results.
They narrowed the Democratic majority in the Senate, but fell short of winning control.
The Republican gains usher in an era of divided government for the United States.
Mr Obama will have to deal with a more conservative Congress, which will include members of the anti-establishment tea party movement.
The results reflected Americans’ frustrations with the weak US economy and disillusionment with Mr Obama, who was swept into office two years ago on a message of hope and change.
Republican John Boehner, destined to replace Nancy Pelosi as House speaker, called the results “a repudiation of Washington, a repudiation of big government and a repudiation of politicians who refuse to listen to the people”.
Mr Obama monitored returns at the White House, then telephoned Mr Boehner and Senate Republican Leader Mitch McConnell with congratulations in a call that underscored the power shift.
In the Senate, Republicans won at least six Senate seats now held by Democrats. Among them was Mr Obama’s old seat in Illinois, captured by a congressman, Representative Mark Kirk.
But Democrats won the biggest single race, with Senate Majority Leader Harry Reid defeating Sharron Angle, a favourite of the tea party movement.
Democrats also retained seats targeted by Republicans in West Virginia and California, where liberal incumbent Barbara Boxer defeated former Hewlett-Packard chief executive Carly Fiorina.
Republicans needed to pick up 10 seats to take control of the 100-seat Senate.
In the House, Republicans had a net gain of 57 seats and were leading in another eight Democratic-held districts. That was more than the 40 needed to capture control.
It also eclipsed their so-called “revolution” that claimed the House in 1994 during Bill Clinton’s presidency, ending decades of Democratic control.
The Republican gains will complicate Mr Obama’s ability to enact his proposals during the last two years of his term and possibly force him to fight off attacks on health care legislation and other bills already signed into law.
Although international affairs had little role in the campaign, Mr Obama’s global agenda also would be affected in areas such as arms control and climate change.
Mr Obama scheduled a news conference for today to discuss the election outcome.
Before the first results came in, Washington already was buzzing with speculation about whether Republican gains would lead to gridlock or attempts to find common ground, and how they would affect Mr Obama’s prospects for re-election in 2012.
Besides the congressional vote, Republicans were making gains in the 37 governors’ races before voters, capturing at least 10 governorships from Democrats and several state legislatures.
Democrats gained two Republican-held governorships – in California and Hawaii. Those races were especially important as states conduct the once-a-decade task of redrawing congressional districts.
The elections were the biggest test yet for the tea party movement, an amorphous series of groups angered by what they see as the excessive growth of government.
They won some big victories. Rand Paul, son of former libertarian presidential candidate Ron Paul, won the Senate seat in Kentucky, despite Democratic claims he was too extreme politically.
Another candidate backed by the movement, Cuban-American Marco Rubio, won in a three-way Senate race in Florida. Nikki Haley, an Indian-American, won the South Carolina governorship.
The tea party, though, may have prevented Republicans from picking up the Delaware seat long held by Vice President Joe Biden.
Christine O’Donnell, a tea party favourite whose outlandish remarks won her national attention, was defeated by Democrat Chris Coons.
Ms O’Donnell shocked the political establishment by winning the party nomination from a veteran moderate congressman who had been heavily favoured to beat Mr Coons.
The Republican gains reflected Mr Obama’s drop in popularity.
Although the president was not on the ballot, Republicans campaigned against his policies, while some Democrats distanced themselves from him. Republicans capitalised on voter anxiety about high unemployment and a rising federal deficit.
Four in 10 voters said they are worse off financially than they were two years ago, according to preliminary exit poll results and pre-election polls.
Those who cast votes expressed dissatisfaction with Mr Obama as well as the two political parties.
Democrats blamed the policies of Mr Obama’s predecessor, Republican George W. Bush, for the weak economy and said Mr Obama’s policies prevented a financial catastrophe.
But it proved difficult to campaign on the message that things could have been worse.
Independents and other voters who had supported Democrats in 2008 shifted to Republicans.
“I will honestly say that I voted for him two years ago,” said Sally McCabe, of Plymouth, Minnesota. “And I want my vote back.”
Mr Obama gave a series of radio interviews pleading with Democratic supporters not to sit on the sidelines.
“I know things are still tough out there, but we finally have job growth again,” he said in one.
All 435 seats in the House were on the ballot, plus 37 in the Senate. Besides the gubernatorial and state legislative races, voters considered ballot measures in 37 states. A proposal in California to legalise recreational marijuana was defeated.
Some of the biggest states elected governors, including California, where Democrat Jerry Brown defeated former eBay chief executive officer Meg Whitman to return to the office he left more than a quarter of a century ago.
In New York, Andrew Cuomo won the office his father Mario held for a dozen years.
Republicans needed to pick up 10 seats to take control of the 100-seat Senate. As of early on Wednesday, Democrats had 51 seats to 46 for Republicans, with three races not yet decided – in Alaska, Colorado and Washington state.
Reid, in Nevada, was considered one of the most vulnerable Democrats, but he won by casting Angle as too extreme for the centrist state.
Among the races yet to be called is in Alaska, where Joe Miller, a candidate supported by the tea party and former Governor Sarah Palin, faces a strong challenge from the incumbent he defeated in the Republican primary, Lisa Murkowski. Democrat Scott McAdams is trailing in third place.
The two other races, in Washington state and Colorado, remain too close to call.
In the House, Republicans had a net gain of 58 seats and led in seven more. That was more than the 40 needed to capture control.