Hillary Clinton won the western battleground of Nevada, bucking a surprising electoral tide that swept Republican Donald Trump into the White House.

It was the first time since the 1940s that Democrats have carried the Silver State in three consecutive presidential elections.  Clinton, whose husband President Bill Clinton twice won the key swing state, picked up Nevada’s six electoral votes with the help of strong precinct-level organizing led by labor unions and retiring Sen. Harry Reid, one of the most powerful politicians in state history.

That same ground game helped Reid’s hand-picked successor, former Attorney General Catherine Cortez Masto, defeat Republican Rep. Joe Heck to become the first Latina who will serve in the U.S. Senate, and recapture a Democratic House district in southern Nevada, where state Sen. Robert Kihuen beat freshman GOP Rep. Cresent Hardy.

A tight race between Republican Danny Tarkanian and former Las Vegas synagogue leader Jacky Rosen remained too close to call.

Nevadans voted to legalize recreational marijuana, but another high-profile statewide ballot measure that would have expanded gun background checks remained undecided. For the first time in 12 years, Washoe County voters approved a school funding measure that will increase the local sales tax by about a half-penny.

Democratic leaders and party faithful who gathered at what they had hoped would be a victory party at a Las Vegas hotel-casino started chanting upon word Nevada had been called for Clinton.

“Yes we can,” they shouted, along with “226” — the number of the local Culinary Union, the biggest in Nevada.

But the mood was bittersweet among activists in the crowd even before Clinton conceded the race to Trump. Some said they were “horrified” at the looming prospect of a Trump presidency.

The billionaire real estate magnate and former reality television star scored an important early caucus victory in Nevada nine months ago and drew huge crowds at rallies on both ends of the state. But the billionaire’s immigration proposals drew criticism from the state’s growing Hispanic population, and his comments about women put GOP candidates on the defensive up and down the ticket in the closing weeks of the campaign.

According to exit polls, Clinton had a clear lead among Nevada’s Hispanic voters, with a majority casting ballots for her and a quarter choosing Trump. More than half of female voters surveyed said they voted for Clinton, while Trump had a lead among men. A third of Trump’s own supporters in the state said Trump’s treatment of women bothered them at least somewhat.

“Having a daughter of my own and seeing how Trump talks about women … even if I agreed with a lot of what he says, I couldn’t in good conscience vote for him,” said Veronica Jones, 34, a Las Vegas mother of five who said she considered voting Republican until Trump won the nomination.

Nevadans entered the night with a century-long reputation of picking presidential winners — 25-and-1 since 1908.

Most recently, they helped elect President Obama twice, after twice backing George W. Bush. But it’s been more than 70 years since Democrats claimed Nevada three times in a row, dating to when Franklin D. Roosevelt won all four of his contests beginning in 1932 and Harry Truman prevailed in 1944.

Ronald Reagan and George Bush turned the trick for the GOP in the 1980s. Before that, John Kennedy and Lyndon Johnson claimed Nevada in 1960 and 1964, but the GOP nominee prevailed over the next 20 years. Bill Clinton scored his victories in 1992 and 1996 before the swing state sided twice with Bush, then swung back blue behind Obama.

Sparks Republican Larry Beck said he voted for change in backing Trump in Washoe County, the biggest swing county in the swing state where heavily Democratic Las Vegas has more than two-thirds of the state’s voters and the GOP-dominated rural areas account for less than 20 percent of the vote. Washoe County ended up backing both Clinton and Cortez Masto.

“We need to get away from these established politicians,” said Beck, a retired developer who served as a Washoe County commissioner from 1987-95. “We had the Clintons. We don’t need any more of them. We don’t need no more Bushes. We need some new blood in there.”

Ricardo Lara, 42, a native of Mexico who has lived in the U.S. for 14 years and works as a contractor at an Air Force base outside Las Vegas, said he cast his ballot early for Clinton partly because he believes Trump doesn’t like Mexicans. He especially didn’t like Trump’s immigration policy.

“Not for myself, but for the people who don’t have papers,” he said.

Sarai Sullivan, 39, a married mother of two who works as a manager of patient relations in a surgeon’s office at a Reno hospital, said she voted “more defensively” in backing Clinton over Trump. She considered voting for a third-party candidate, but decided Clinton has more of the experience necessary to lead the country and was especially turned off by Trump during the debates.

“He has poor impulse control,” Sullivan said. “He says whatever, whenever he wants whether it is factual, racist, sexist or unprofessional.”