If you were told a Republican has a 30-point lead in one of the two states that hold off-year gubernatorial elections, in the past you would have guessed Virginia, seat of the old confederacy, certainly not New Jersey. But the politics have flipped. Republican Chris Christie is cruising to victory in the blue state of New Jersey, and Democrat Terry McAuliffe has a big lead in Virginia, topping a ticket that could sweep enough Democrats into elective office to install a Democratic attorney general for the first time in decades and break the GOP’s lock on the Virginia General Assembly.

Seeing opportunity in this once red state on the issue New York City Mayor Michael Bloomberg cares most about, gun safety, his Independence USA super PAC, which he founded last year, contributed some $2 million to McAuliffe’s campaign and to the Virginia Democratic caucus overseeing state legislative races. On Tuesday—just seven days before Election Day— Independence USA directed another $1 million into the race for attorney general, where Democrat Mark Herring has a real chance to defeat Republican Mark Obenshain. As a state senator, Obenshain voted to repeal the one-handgun-a-month law and to allow guns in bars and daycare centers. He also supports the bulk purchase of guns and opposes closing the gun show loophole.

If McAuliffe wins, as the polls indicate, he will break a long-standing curse that whatever party holds the White House loses the governor’s race in Virginia. And he will buoy hopes among Democrats that Virginia is reliably purple, if not blue, in the 2016 presidential election. Lots of issues are breaking against Republicans and for Democrats in Virginia, from the government shutdown in a state with hundreds of thousands of federal workers to an aggressive anti-abortion rights stance by Republicans. The latter has backfired among women and created a double-digit gender gap for McAuliffe against Republican Ken Cuccinelli, who as attorney general strongly identified with anti-abortion rights forces in the state.

Contrasting McAuliffe’s success in Virginia with the failure of Democrats to mount a serious challenge in New Jersey has a lot to do with the individual candidates involved. But it also underscores the pathway to victory for Democrats: painting your opponent as extreme. For Republicans, the winning strategy seems to be sticking to economic growth and reform, and staying away from the social issues. In Virginia, choosing the right path was easy for McAuliffe and the Democrats. The top three statewide candidates for the GOP are walking billboards for extremism, which gave McAuliffe plenty of running room, even among more rural voters, to the point where he could be more assertive on issues of gun safety than anyone had previously dared, calling for expanded background checks and limits on the size of gun magazines.

The massacre at Virginia Tech in 2007 is still fresh in people’s minds, and with the recent shooting at the Navy Yard, which is geographically in Virginia’s backyard, voters are more open to hearing politicians talk about gun safety. The same Washington Post poll that has McAuliffe up by a dozen points found that 86 percent of those surveyed support background checks; just 10 percent oppose, with 4 percent undecided. On the campaign trail, McAuliffe emphasizes that he is a hunter, that he owns guns, and that supporting measures that keep guns out of the hands of criminals and the mentally ill does not interfere with the rights of hunters.

“This is a state that is moving in the right direction on all social issues, including guns, which is one reason the statewide Republican candidates all seem out of touch,” says Jim Kessler, a co-founder of the centrist Democratic group Third Way.

Democrat Kathleen Murphy, who is challenging a two-term incumbent for a state House seat in District 34, a northern Virginia suburb, has made gun safety the center of her campaign. (Full disclosure: Murphy is a friend and has kept me posted on her campaign from when she was considered a long shot in January to where she is now in contention.) Republican Barbara Comstock has a top rating from the National Rifle Association, and Murphy started badgering Bloomberg’s people in New York months ago to seek their help in a race that could turn on commonsense gun reform. She was thrilled to receive $100,000 from Bloomberg’s PAC, directed contributions from Bloomberg’s PAC, and other donors to Virginia delegate candidates. At an event in Washington over the weekend, a friend warned her to be careful on the gun issue and not to push her advocacy too far. “I’m 65 years old, and I’m not planning on running for Congress or president,” she said. “I believe what I believe. I lost my brother to gun violence. I’m not backing down on this issue.”

The NRA has participated only minimally in Virginia, with a $500,000 ad campaign linking Herring, the Democratic attorney general candidate, with gun control, higher taxes, and of course Bloomberg himself. “In these races they try to make Bloomberg the issue,” says Kessler. It worked in Colorado, where local Democrats supported by Mayors Against Illegal Guns were defeated in a September recall election by an NRA-funded backlash. Virginia should have a happier ending for gun safety and a host of other progressive causes while Republicans ponder what went wrong, and where they ran astray from the tides of change.