Some independent analysts suggest that the Republican surge could be even greater.

Louis Jacobson, who analyzed state legislative races for Governing magazine, rated 21 chambers now held by Democrats as “in play,” compared with only four held by Republicans. Larry J. Sabato, the director of the Center for Politics at the University of Virginia, predicted recently that Republicans could gain 8 to 12 legislative chambers. Tim Storey, a senior fellow with the National Conference of State Legislatures, said that the way the midterm election was shaping up, “you could see Republicans easily have their best redistricting position in the modern era of redistricting.”

Many of the factors making Congressional Democrats nervous are at play in local elections as well: frustration at the continuing economic downturn is being directed at incumbents and the party in power, Republicans have seen their popularity improving in some polls, and there are indications in recent polls that Republicans are more motivated to vote than Democrats.

But Democrats warn that it would be premature to write them off. “As Mark Twain might say, the reports of Democratic state legislators’ deaths are greatly exaggerated,” read a recent post by the Democratic Legislative Campaign Committee, a 527 group that expects to spend $20 million this year on legislative races.

Democrats noted that local legislative elections did not always follow the contours of national elections, citing 2004, when the Democrats won control of six more legislative chambers even as their party lost the race for president and seats in Congress.

Michael Sargeant, the campaign committee’s executive director, called the Democratic-held legislatures “the fire wall for the rest of the Democratic Party” in drawing the lines that will help decide who controls Congress for the next decade. Mr. Sargeant said Democrats had an opportunity to gain control of House chambers in Tennessee and Texas and Senate chambers in Kentucky and Michigan.

To an extent, the Democrats may be the victims of their own success: they have more to lose, because they have made steady gains for much of the last decade. There are 4,048 Democratic state lawmakers and 3,251 Republican ones, by Mr. Storey’s count.

But many Democrats are frustrated and alarmed by the prospect that they could see the gains they had made  with legislatures and governorships  eroded or erased just when it counts the most, before redistricting takes place.