“The days of obstruction are over,” said Senator Charles E. Schumer of New York, chairman of the Democratic Senatorial Campaign Committee. “And in a bipartisan way, we in the Senate and our colleagues in the House will work together to turn America in the right direction after eight long years.”

Since winning control of the Senate in 2006, the Democrats have had little breathing room, holding a majority of just 51 to 49, thanks only to two independents, Senators Bernard Sanders of Vermont and Joseph I. Lieberman of Connecticut, who have caucused with them. And Mr. Lieberman has consistently voted against the Democrats on bills related to the Iraq war and national security, giving Republicans and President Bush an edge on those issues.

Mr. Lieberman, a close ally of Senator John McCain, now faces uncertain standing within the Democratic Party; some colleagues have talked about stripping him of his post as chairman of the Homeland Security and Governmental Affairs Committee. Even so, it is clear that the party will have more muscle to pursue its agenda in the coming Congress.

From the White Mountains of New Hampshire to the Rocky Mountains in the West to the glaciers of Alaska, Democratic candidates rode a wave of dissatisfaction with Republicans and the Bush administration. It began with frustration over the war in Iraq and broadened into fury and dismay over economic turmoil at home, with home prices falling, unemployment on the rise and consumer confidence shattered.

In New Hampshire, the Democrat, former Gov. Jeanne Shaheen, defeated Mr. Sununu in a bitter rematch of their 2002 contest by repeatedly tying him to President Bush, on the war, national security, economic policies and energy. She becomes the first female senator in the state’s history and the first Democrat elected to the Senate from New Hampshire in more than 28 years.

Mrs. Shaheen, 61, capitalized on a huge transformation of the electorate in recent years that has shifted the state solidly into the Democratic column. Mr. Sununu, who at 44 is the youngest senator, had hoped to ride Mr. McCain’s coattails but found himself battling alone as support for Mr. McCain dissipated and Senator Barack Obama opened up a wide lead in most voter polls.