Within minutes of NBC News’ calling Virginia’s gubernatorial election for Ralph Northam on Tuesday night, Democratic National Committee chairman Tom Perez phoned into MSNBC to celebrate. “I’m feeling incredibly optimistic,” he said when host Chris Hayes asked about Democratic gains in the state’s House of Delegates. “The author of the anti-transgender bathroom bill just got defeated by a woman named Danica Roem—a transgender woman who is a spectacular candidate.”

Perez proceeded to name-check Elizabeth Guzman and Hala Ayala, the first Latinas ever elected to the House, but then Hayes asked him about another candidate—one who’d barely received any national attention throughout the campaign. “There’s also, I believe, a Marine veteran who identifies as a democratic socialist who, if I’m not mistaken, is running competitively with someone in the House GOP leadership,” he said. “The House GOP whip might lose to a socialist Marine veteran? Is that actually happening?”

It was indeed. Democrat Lee Carter, a red-haired, 30-year-old Marine veteran from Manassas, won a remarkable nine-point victory to oust Delegate Jackson Miller, a deep-pocketed Republican incumbent who serves as House majority whip. Carter ran openly as a socialist—he and his supporters crooned the union anthem “Solidarity Forever” after their victory—and he won with almost no institutional support from the state Democratic Party. The Richmond Times-Dispatch’s Patrick Wilson reported last month that party leaders “abandoned” Carter after he declined to report campaign metrics like the number of doors he’d knocked and the amount of money he’d raised. Carter told Wilson he “ceased reporting to the House caucus after multiple information security lapses in which confidential information that we reported to the House caucus was leaked outside of the party infrastructure.” But he also said the party leaders “wanted a bit more editorial control over my messaging than I was comfortable with.” Wilson wrote that “Democratic Party leaders were not eager to discuss Carter, preferring to promote other candidates.” In fact, Wilson called Carter “the kind of rogue candidate that gives an apparatus like the Democratic Party of Virginia a fit.”

Now is a good time for me to share a thought about Lee Carter. People within the Democratic Party would have preferred I not write about him. The party, like Republicans in Virginia, is closely tied to the big energy monopoly and Carter stood against that. — Patrick Wilson (@patrickmwilson) November 8, 2017

Carter did receive funding from Democratic-aligned groups as well as support from WinVA, a PAC supporting Democratic House candidates run by former congressman and gubernatorial primary candidate Tom Perriello, according to a campaign finance report uploaded by The Intercept’s Lee Fang. But Carter’s victory is a testament to his own campaign and the work of outside groups, including the D.C. chapter of the Democratic Socialists of America, which caught the rising Democratic wave that swept even unlikely candidates into office on Tuesday.

It’s fitting that Carter’s campaign ended with a shocking result, because it was inspired by a literal shock two summers ago. “I was installing lighting control systems and I got shocked because the lighting control panel I was working on was miswired by an electrician,” he told me in Manassas last month. “I got a 245-volt shock—in one hand, out the other—right across the chest.” He blew out his back in the incident. He could barely walk for months. His frustrating battle with the state to get workers’ compensation for his injury inspired him to enter politics. “When I was able to walk again,” he told me, “I decided I’m not just going to walk. I’m going to run for something because nobody should have to go through this.”