DENVER — When Colorado passed a series of tough gun restrictions last winter, Democrats and gun control advocates hailed it as a sign of changing attitudes in a Western swing state. But moments after a pivotal vote in the state Senate, a Republican lawmaker named Greg Brophy warned that Colorado’s independent-leaning voters would rebel against the new laws.

“The backlash will be severe,” he said.

On Tuesday, Democrats here got a taste of that popular anger, as voters in a recall election ousted two state senators who had been strong supporters of the gun control laws. Although it was a small, off-year election, the recall campaign grew into a referendum that pitted the National Rifle Association against Mayor Michael R. Bloomberg of New York.

On Wednesday, gun advocates called the result a huge victory that they said would dampen other states’ efforts to pursue gun restrictions.

While some voters in the two districts groused about the flood of donations Mr. Bloomberg and outside groups made in the recall campaigns, analysts in Colorado said the election results were shaped by an eruption of local discontent from voters who say their leaders are ignoring the concerns of gun owners and abandoning Colorado’s rural, libertarian roots.

After years of gains propelled by shifting demographics and voter attitudes, Democrats now control the state legislature and the governor’s mansion, and make up most of Colorado’s Congressional delegation. But state officials said that the recalls showed how Colorado’s political pendulum could still swing in surprising directions, and that deep rifts still lay beneath its increasingly blue veneer.

“This is a state with a wide variety of interests at stake,” said Bill Ritter, a Democrat and former governor. “The Democratic Party cannot be the party of metro Denver and Boulder. It has to be the party who understands the values, views and aspirations of people who live outside of those areas.”

In addition to the gun laws, Democratic majorities in the legislature passed green-energy requirements for rural electric cooperatives, offered in-state college tuition to illegal immigrants who were Colorado high school graduates, and expanded mail-in voting. And Gov. John W. Hickenlooper, a Democrat, granted a reprieve to a convicted killer, heading off the state’s first execution in 16 years. Republicans opposed many of those acts.

As they fought for their political lives, the two senators facing recall, John Morse and Angela Giron, described themselves as common-sense Democrats who understood their state’s values. Mr. Morse, also the state Senate president, had been a police chief. Ms. Giron represented the heavily Hispanic, working-class town of Pueblo, which has struggled through years of layoffs at its steel mill.

They said the new gun laws, which include background checks on private gun sales and limits on ammunition magazines, were moderate restrictions that made sense in a state scarred by gun massacres at Columbine High School in 1999 and a movie theater in Aurora last year. In a state where hunting and shooting have long been part of everyday life, Mr. Morse and Ms. Giron had to make a nuanced case that they supported both gun rights as well as some restrictions.

But on Tuesday, many of their constituents seemed to reject their arguments. Mr. Morse lost his recall by 343 votes — almost the same margin by which he had eked out re-election in 2010.

Ms. Giron’s loss raised far more red flags for Democrats. She represented a district where registered Democrats outnumbered Republicans by two to one, and she won her seat in 2010 by 10 percentage points. But on Tuesday, voters lined up against her, 56 percent to 44 percent.

Photo

Senator John Morse was also recalled. The two Democrats had backed tough gun restrictions.Credit
Matthew Staver for The New York Times

Of the state’s four Hispanic lawmakers from Pueblo County, Ms. Giron was the only one to back the most contentious gun legislation, said Theresa Trujillo, the Southern Colorado director for the Colorado Progressive Coalition. She also said that young Latino voters — a likely source of support — were not committed to the election. Recall proponents, she said, were gung-ho.

“Our opposition was really very effective at establishing this binary that either you’re for guns or you’re against guns,” Ms. Trujillo said. “It was a simple message, but that sound bite really caught on and sold well. We used every tool possible to fight it, to try and build the same kind of momentum, but it wasn’t as effective.”

Dick Wadhams, a former state Republican Party chairman, said that the district’s more conservative Democrats appeared to break with Ms. Giron on issues like guns and abortion.

An error has occurred. Please try again later.

You are already subscribed to this email.

A decade ago, Mr. Wadhams said, voters bristled at a series of Republican actions that were seen as too socially conservative. Now, he said, new Democratic majorities were beginning to anger independent voters.

“These recalls are a reaction to the overreach of Democrats, and their arrogance,” Mr. Wadhams said.

Cracks are also spreading in Northern Colorado, where agriculture and oil-and-gas development dominate the economy. There, several counties upset with what they call the leftward drift of Colorado’s leaders will vote this fall on whether to secede and form their own state. A quixotic goal perhaps, but analysts said it highlighted the widening urban-rural rift in the West.

Despite their symbolic heft, the recalls will have limited immediate effects. Mr. Morse and Ms. Giron will be replaced by two Republicans who were on the recall ballots. Democrats, though, will still cling to a majority in the state Senate. And all of the gun control laws remain on the books.

On Tuesday, 52,540 people voted in the two Senate districts — a tiny fraction of Colorado’s population of more than five million, and about 21,000 fewer than voted in the two districts in 2010. And it is far from clear whether most Coloradans agree with the results of the recalls.

A Quinnipiac University poll in August found that voters did not like the special elections, even if they did not agree with the legislators. Politicians who have flourished here, a state where voters are almost evenly divided between Democrats, Republicans and those who do not identify with any political party, have often had to tack to the center.

Political analysts say the next real test for Colorado’s band of Western Democrats will come next year, when Mr. Hickenlooper and many of the state’s other lawmakers are up for re-election. Mr. Hickenlooper, who earned high marks from many analysts for guiding the state through the aftermath of Aurora and two brutal summers of wildfires, has seen his popularity dip recently. The Quinnipiac poll found that only 45 percent of voters said he deserved another term.

“The reason the recalls prevailed is because the Democrats went too far,” said Mr. Brophy, the Republican senator.

Mr. Brophy has announced his candidacy for governor, joining Tom Tancredo, a former congressman, in running for the Republican nomination. Colorado’s secretary of state, Scott Gessler, is also expected to seek the nomination. Mr. Brophy is now driving through the mountains of southwest Colorado, meeting people and trying to build support. He said he had been hearing from many frustrated voters.

“Politics is a team sport,” he said, “and that team has gotten too extreme for Colorado.”

A version of this article appears in print on September 12, 2013, on Page A1 of the New York edition with the headline: Recall Vote on Guns Exposes Rift in Colorado’s Blue Veneer. Order Reprints|Today's Paper|Subscribe