Democrat Terry McAuliffe eked out a narrow victory in the Virginia governor’s race on Tuesday night, defeating Attorney General Ken Cuccinelli (R) and Libertarian candidate Rob Sarvis.

McAuliffe’s victory speech focused on bipartisanship. He thanked the Republicans who backed him in the race and said the victory was hard fought.

“This election was never a choice between Democrats and Republicans,” McAuliffe said. “It was an election over whether Virginia would continue the mainstream bipartisan tradition that served us so well.”

McAuliffe’s win ends months of him leading Cuccinelli in most polls. It also marks a victory for a number of outside groups that poured millions in the race in support of McAuliffe and against Cuccinelli like Independence USA PAC and Planned Parenthood.

Democrats see the victory as proof that hitting conservative candidates on their tea party leanings can win elections.

“The Republican brand has become the tea party brand. They are inseparable now,” Democratic National Committee Communications Director Mo Elleithee told TPM. “Kind of take a step back from just Virginia. Joe Lhota up in New York, where they haven’t elected a Democrat in 20 years, spent the entire general election trying to distance himself from the Republican Party brand, even though he previously called himself a Goldwater Conservative, tried to distance himself from the Republican brand. That didn’t work. Polling is showing that for the first time the tea party and the Republican Party are polling at the same abysmal level.”

The idea, Elleithee continued, is to tie Republicans to the tea party as tightly as possible.

“People don’t see a distinction between the two,” Elleithee continued. “And both brands are weaker than ever. This is becoming a referendum on the Republican Party.”

Democrats stress that McAuliffe’s attack strategy is only part of the recipe of cooking a successful campaign and add that the right candidate with the right message has to be on the other side of the attacks. Linking a candidate to the tea party through topics like the government shutdown, abortion issues or gun rights can only happen if the candidate embraces those stances too, as Cuccinelli did.

“I think you happen to have a really extreme ideologue running and if you look at who has been in leadership positions in Virginia, state executive positions, whether they have been Democrats or Republicans, they have governed from the middle,” Virginia Democratic activist Susan Swecker said.

But Democrats say the same strategy that McAuliffe used — stick to the center in a blue-leaning-purple state while also turning Cuccinelli’s habit of touting his conservatism against him — can be used in future races in Virginia and even around the country.

“I do think it is something, at least in Virginia that is replicable, because we’ve proven ourselves to be a state that if you look at our last three governors and you look at the campaigns they ran they were real claims to the center. Every one of them was about jobs and mainstream economic issues that spoke about things that really mattered to Virginians’ lives,” a Virginia Democratic party official told TPM.

Other elections on Tuesday night support this argument. Cuccinelli, a candidate who hoped support from tea partiers in Virginia would propel him to the governor’s mansion, lost while New Jersey Gov. Chris Christie (R), who identifies with the more mainstream wing of the GOP, is expected to win handily.

“The difference between the two candidates is self-evident — Christie has governed as an unapologetic centrist Republican with a no-nonsense focus on fighting for fiscal discipline rather than an obsession with social conservatism,” Daily Beast executive senior editor John Avlon wrote in a column for CNN. “He has built cross-aisle coalitions, even on controversial policy proposals, and reached out beyond the base. He puts problem-solving ahead of partisanship or ideology. In other words, Christie is pretty much the opposite of Cuccinelli, and that’s why he is winning in an otherwise ugly year for Republicans.”

The trick, Democrats say, is to focus on winning over voters that conservative candidates are quick to alienate, like women voters, LGBT people and minorities. McAuliffe simultaneously focused on the economy while also staying on the attack. Virginia Democrats say McAuliffe did a masterful job at this and likely would have won those groups without the help of outside organizations like former Rep. Gabrielle Giffords’s (D-AZ) Americans for Responsible Solutions and Planned Parenthood (although their support helped as did Cuccinelli’s outspoken opposition to abortion rights and gun rights among other issues).

McAuliffe also benefited from the shutdown as the blame fell on mostly congressional Republicans which he was able to link to Cuccinelli via some of the surrogates who went out to campaign for the attorney general like Sens. Ted Cruz (R-TX) and Rand Paul (R-KY). Democrats hope that the shutdown would also stay in the minds of voters around the country through the next election cycle.

“With so many government employees and so many military installations that Virginians were particularly impacted by the shutdown, it’s not surprising that Cuccinelli suffered,” said Democratic National Committee Chairwoman Debbie Wasserman Schultz. “Nowhere in America did any state’s voters think that shutting the federal government down in order to stop the implementation of the Affordable Care Act was a good idea.”

“Ken Cuccinelli himself connected himself to the tea party,” Wasserman Schultz said. “He had Ted Cruz and Marco Rubio and the entire Mount Rushmore of the tea party come in to campaign for him here.”

Cuccinelli did try to move to the center at moments throughout the campaign but even when he did it was clearly insincere which helped the McAuliffe campaign, McAuliffe spokesman Josh Schwerin said.

“He sort of would pretend to talk about jobs and keep end up talking about how abortion is like slavery and that’s the kind of issue that kept coming up for him and he never attempted to talk to independent voters, he never attempted to talk to mainstream Republicans even and that was something that Terry thinks is an important thing you should be doing both campaigning and governing,” Schwerin said.

Even before polls closed Tuesday night the Democratic Senatorial Campaign Committee had already sent out a campaign email to supporters capitalizing on an expected McAuliffe win. The email cited contentious Senate races around the country as examples where the same strategy of hitting Cuccinelli could work.

“Faced with a choice between a reckless and irresponsible candidate who backs the Tea Party agenda and Democrats willing to push for responsible solutions to the problems our nation faces, Democrats win,” the email said. “And unfortunately for national Republicans, their Senate candidates in North Carolina, Arkansas, Louisiana, Alaska, Georgia, Kentucky, Iowa, Michigan, Montana, and West Virginia have made it clear they’re on the side of Ted Cruz and Ken Cuccinelli. On the government shutdown, women’s issues, and jobs and the economy, voters in Virginia tonight will reject their platform.”

Virginia Democrats caution though that the tea party strategy can only be so effective if the candidate actually embraces the tea party as much as Cuccinelli did in Virginia. But that shouldn’t be much of a problem, according to Elleithee.

“Terry McAuliffe was just the better candidate with the better message and he understood the state better. And that matters,” Elleithee said.