Democrat Kyrsten Sinema has officially defeated Republican Martha McSally in the super close, hotly contested Arizona Senate race. Her win marks the first time Democrats have been able to flip the seat since the 1980s. Shifting Arizona a bit more to the left is a long-held Democratic goal, and it’s one they were finally able to pull off this year.

A confluence of factors including demographic changes, anti-Trump enthusiasm and the strength of Sinema’s candidacy likely contributed to the party’s success.

Sinema — a former Green Party supporter who’s rebranded herself as a moderate Blue Dog Democrat — impressed many this cycle by racking up blockbuster fundraising numbers and holding her own against McSally, a former Air Force fighter pilot. She also surprised observers with how well she performed in the polls leading up to the election as she sought to emphasize her bipartisan bona fides.

While it wasn’t exactly clear if all this would be enough — the final outcome suggests that something clicked into place in the end.

“There are three states that we constantly discuss in terms of their blue potential: Georgia, Texas, and Arizona,” Larry Sabato, the director of the University of Virginia’s Center for Politics said, ahead of last Tuesday’s election. “You could make a case this year for all three but I also wouldn’t be surprised if none of them win.” (There is no Senate seat on the ballot this year in Georgia, but there is a contested governor’s race that’s still being decided.)

Arizona’s enduring conservative bent has stymied Democrats in the past. The last presidential election the state voted Democratic was the Bill Clinton-Bob Dole race in 1996. And although Trump’s approval ratings in the state have sagged, they continue to clock in around 47 percent — 5 points higher than the national average.

Experts noted that the current political climate and more dedicated efforts to turn out Latino voters could enable Democrats to gain a firmer foothold in Arizona — though this was far from the first time there’s been speculation along these lines. In 2016, Hillary Clinton even campaigned in the southwestern state, but the victory she was hoping for didn’t ultimately materialize. Here are five signs which could explain why this year’s Senate race was ultimately different.

1) The state’s demographics are (still) changing

There are two key demographic shifts that could very well have helped push Arizona further into the blue if Democrats were able to figure out how to properly harness them.

The first is the growing number of Latino residents in the state, who now make up 30 percent of Arizona’s population, but have historically comprised just 18-20 percent of the voters casting ballots, according to Politico.

The second — which includes some overlap — is an uptick in residents moving to Arizona from more liberal states. According to a recent Census study, Arizona gained nearly 80,000 new residents in the span of a year, making it the fifth-fastest growing state in the country. Many of these new residents came from states like California as they sought a lower overall cost of living.

Both could have been a boon for Democrats if the party was able to conduct effective outreach and mobilize them for the election. It’s still too early to know exact turnout information, but exit polls showed that Latino voters in the state broke for Sinema over McSally by an overwhelming margin. These polls had 69 percent of Latino voters backing Sinema compared to 31 percent who backed McSally.

“This state is in flux. It has been for many, many years,” Republican campaign operative Nathan Brown said. “[There are] Latinos being fired up to vote against Donald Trump and people coming in from liberal states because we have less taxes.”

2) Recent elections have gotten closer and closer

Two recent elections also bolster the case that the state has been trending in Democrats’ favor. While Hillary Clinton did not win Arizona in 2016, she did come much closer to doing so than Barack Obama in the previous election. In 2012, Mitt Romney won Arizona by 10 percentage points over Obama, while Trump won the state by just 3.5 percentage points over Clinton.

Democrats have pointed to this narrowing margin as an indication of how the state has moved to the left. A special election that took place in the state’s Eighth Congressional District earlier this year has also been cited to support this argument. In an April race to fill a congressional seat vacated by Republican Rep. Trent Franks, Republican Debbie Lesko edged out Democrat Hiral Tipirneni — but she did so by only 5 percentage points.

For the Eighth District — which leans heavily conservative — a margin like that was a major departure from the 2016 election when Franks won over his Democratic rival by more than 35 percentage points. That special election might just be the “canary in the coal mine,” said Mike Noble, a chief pollster at OH Predictive Insights, a firm based in Phoenix.

If that degree of enthusiasm held for the general election — as it seems to have — Democrats in tighter races like the Senate one — could very well have benefitted.

3) Independents could have tipped the balance

Arizonans love to talk about their independent streak and that’s something that’s also reflected in voters’ political affiliations. As of early November, the state had roughly 1.29 million registered Republicans, 1.15 million registered Democrats and 1.24 million registered Independents, according to the Arizona Secretary of State.

“We’re about a third, a third, a third — Republican, independent, and Democrat, in that order,” Rochwalik said. “It’s the independent voter that makes the decision in Arizona.”

Swing voters could very well have shifted the scales in favor of Democrats this cycle, since many are displeased with Trump’s policies and rhetoric. In a June NBC News poll, independent voters in Arizona said their vote in November would act as a check on Trump and not an effort to support his agenda — by a 21-point margin.

“Most of the independents see themselves as sort-of Democrats and sort-of Republicans,” University of Arizona political science professor Thomas Volgy said. “This doesn’t appear to be the case this year — it looks like they’re heavily moving away from the Republican Party.”

If enough independents voted for Sinema, that bloc of voters combined with the existing Democratic base could have been sufficient to overcome the numeric advantage that Republicans have in the state — particularly if the Republican base had a depressed voter turnout. An October poll from ABC/OH Predictive Insights found that 48 percent of independent voters were backing Sinema, compared to 36 percent backing McSally.

4) Some moderate Republicans could have peeled off as well

Independents might not have been the only group that broke for Sinema. Polling data suggests that she could have picked up some moderate Republicans as well. The October OH Predictive Insights poll found that 15 percent of Republican voters who said they “lean conservative” were supporting Sinema.

This dynamic was present in the Eighth Congressional District special election earlier this year as well. As the Arizona Republic reported, some polls showed Tipirneni, the Democratic candidate, garnering as much as 15 percent of the Republican vote in that April election.

While experts remain skeptical of how large this party defection could actually be, McSally herself alluded to this phenomenon during an interview earlier this fall. “We need Republicans to vote Republican,” she said during an appearance on The Jeff Oravits Show. “We’ve got some moderate Republicans who have seemed to have drank Kyrsten Sinema’s Kool-Aid in the polling and we need to bring them back home.”

Sinema’s campaign also sought to capitalize on these potential voters. It previously announced the launch of a coalition of Republican supporters aimed at reaching undecided Republicans.

5) Sinema seems uniquely suited to the state

Much of the Democratic hope for the Arizona Senate seat rested on the strength of Sinema’s candidacy. Sinema was considered a top recruit as Democrats angled to retake the upper chamber, and her centrist positioning and voting record enabled her to appeal to voters across the spectrum — even as it raised questions among members of her own party.

During a fiery debate with McSally in October, she was able to simultaneously point to her vote against an Obamacare repeal and highlight how she worked with Republicans on certain measures related to border security — further underscoring her branding as an “independent” voice.

“She’s a prolific fundraiser and she’s almost embarrassingly talented and qualified for this job,” Don Bivens, a former chair of the state party, told RealClearPolitics. As USA Today reports, Sinema had outraised McSally by roughly $500,000 in the last quarter ahead of the election.

“I don’t think there’s been a Democrat that’s actually been good at fundraising and actually good at running a political campaign in a really long time. I think that’s huge,” Brown, the Republican operative, said

Sinema’s powerhouse fundraising and independent image, paired with an enthusiastic Democratic base, looks like it finally resulted in the win that the party’s been looking for in the state. “You’re really not going to find a better year for Democrats,” Noble said.