Graphic: Shelly Tan, The Washington Post

Correction: An earlier version of this post incorrectly identified a legislative chamber. Republicans retook control of the Maine state Senate, not the House.

Voter anger over a stagnant economic recession and gridlock in Washington extended far beyond the Beltway on Tuesday night as Americans delivered stunning blows to Democratic candidates in statewide races across the country.

Bolstered by national voter sentiment, tens of millions of dollars in outside spending and improved field programs, Republicans picked up Democratic-held governorships in deep blue states such as Massachusetts, Maryland and Illinois, as well as in Arkansas. The wins swell the ranks of Republican governors to at least 31, near a high water mark in the modern era.

Republican gains extended to state legislative chambers as well. Before Election Day, the GOP controlled 59 of 98 partisan legislative chambers across the country. On Tuesday, preliminary results showed Republicans had won control of both the Nevada Assembly and Senate, the Colorado and Maine Senates and state House chambers in Minnesota, New Mexico, West Virginia and New Hampshire.

That would give the party control of 67 chambers, five more than their previous record in the modern era, set after special elections in 2011 and 2012.

It also would give Republicans total control of 24 states, in which they hold the governor’s mansion and both chambers of the state legislature (Nebraska’s unicameral legislature is technically nonpartisan, but in practice Republicans control the chamber by a wide margin). Democrats, by contrast, are likely to control all three legs of the governing stool in only six states.

Many Republican majorities got bigger on Tuesday night. The GOP won outright control of state Senates in Washington and New York, which they had controlled under coalition agreements with centrist Democrats. By the early morning hours on Wednesday, Republicans claimed supermajority status in 16 legislative chambers. Republicans won four lieutenant governorships previously held by Democrats — in Arkansas, Illinois, Maryland and Massachusetts.

Republicans made the most of voter displeasure with higher taxes in Maryland, where businessman Larry Hogan (R) pulled off a stunning upset over Lt. Gov. Anthony Brown (D), and in Illinois, where Gov. Pat Quinn (D) lost to venture capitalist Bruce Rauner after signing an unpopular tax hike.

The national wave helped former congressman Asa Hutchinson win in Arkansas, where Republicans swept all four House seats and a U.S. Senate seat and made gains in the state legislature. And in Massachusetts, voters saw Attorney General Martha Coakley (D) as a Beacon Hill insider and opted instead for Republican businessman Charlie Baker.

Democrats, who felt good about the party’s chances to take back territory in Republican-held states, ousted only one GOP governor: Pennsylvania’s Tom Corbett (R). Alaska Gov. Sean Parnell (R) looked headed for defeat, too, at the hands of independent candidate Bill Walker; with 94 percent of the vote in, Walker led 48 percent to 46.6 percent.

But Democratic hopes were stymied in a number of battleground states, where vulnerable Republican governors barely survived. In Florida, Gov. Rick Scott (R) held off a challenge from former governor Charlie Crist (D) by just over one percentage point. Kansas Gov. Sam Brownback (R), whom some Republican strategists had left for dead, defeated state House Minority Leader Paul Davis (D), 50 percent to 46 percent. Even Maine Gov. Paul LePage (R), seen by both sides as a long shot at best, won reelection by almost four points.

At the beginning of the cycle, Democrats had hoped to take out governors seeking reelection after winning in the tea party wave of 2010. But early targets such as Michigan Gov. Rick Snyder (R), Ohio Gov. John Kasich (R) and Wisconsin Gov. Scott Walker (R) all won reelection Tuesday night.

Instead, it was Democratic governors who found themselves scrambling to save their jobs. Colorado Gov. John Hickenlooper (D) trailed for most of the night before taking a small 2,000-vote lead over his opponent, former congressman Bob Beauprez. Connecticut Gov. Dannel Malloy (D), too, trailed early before making up ground. With 87 percent of precincts reporting, Malloy held a 13,000-vote lead, about 1.4 percent, over former U.S. ambassador Tom Foley. The Associated Press had not declared a winner in either race. Even Oregon Gov. John Kitzhaber (D) struggled, ultimately beating underfunded state Rep. Dennis Richardson (R) by a narrow three-point margin.

Perhaps most embarrassingly, Vermont Gov. Peter Shumlin (D), who heads the Democratic Governors Association, will be forced to go to the state legislature to win reelection. State law requires the governor to be chosen by the legislature if no candidate gets above 50 percent of the vote; Shumlin finished with just 46.6 percent, only 2,500 votes ahead of a little-known businessman.

Vermont’s legislature is overwhelmingly Democratic, giving Shumlin the edge. Still, no one gave his Republican challenger, Scott Milne, a chance to come so close to the upset.

Democrats held the line in two important legislative chambers: In Kentucky’s state House, the party salvaged 53 out of 100 seats up for grabs, with one race yet to be decided. And Democrats held onto the Iowa state Senate, denying Gov. Terry Branstad (R) complete control over the legislature.