Copyright The Boston Globe

With more than 95 percent of the vote in, she was beating her Republican opponent, the lieutenant governor, Winsome Earle-Sears, by a more than 14-point margin. Favored from the start, Spanberger, 46, ran a disciplined campaign focused on jobs and the cost of living. She also emphasized her support for abortion rights and she vowed to roll back an order directing state police to cooperate with the federal government on immigration enforcement. But she rarely veered far from the center. In August, she welcomed the endorsement of the Virginia Police Benevolent Association, the state’s largest police organization. Since she entered politics in 2018, centrism has been Spanberger’s brand. Her law-and-order resume and her moderate mien seemed in many ways tailor-made for politics in Virginia, a once solidly conservative commonwealth that has turned a light shade of blue over the past two decades. This change in political hue has been driven largely by the tens of thousands of government contractors and civil servants who have come to live and work in the northern part of the state. The havoc wreaked on this population by Trump administration cuts made it fertile ground for almost any Democratic candidate, but especially one who worked for the CIA, which has its headquarters in Langley, in Northern Virginia. Spanberger, the daughter of a nurse and a law enforcement officer, spent her teenage years in the Richmond suburbs. After graduating from the University of Virginia and then earning a master’s degree in business, she applied to the CIA. While she waited to pass the lengthy background check, she worked as an agent with the US Postal Inspection Service, where she focused on drug-related and money-laundering crimes. Once she was hired at the CIA, she spent eight years as an officer, working in the United States and overseas. In 2014, Spanberger moved with her husband, Adam, a software engineer, and their three daughters to the Richmond suburbs. And after working for a consulting firm for several years, she decided to run for Congress. Virginia’s 7th Congressional District, where she lived, was not promising terrain for a Democrat. The district had been held by Republicans for nearly five decades, and at the time it was represented by Dave Brat, a Tea Party celebrity who in 2014 unseated Eric Cantor, the House majority leader, in the Republican primary, arguing that Cantor was not conservative enough. Brat won the district by 16 percentage points in 2016. But the district was changing. In 2018 Spanberger won the seat in an upset, putting up a strong performance in what were once solidly Republican suburbs, a victory that reflected the country’s accelerating partisan realignment. Still, even as suburban voters were souring on President Trump, Spanberger made a point of not running merely as a fighter in the anti-Trump resistance. “Beating the drum about how terrible the president is just beating the drum,” Spanberger said in an article in 2018. “It’s not actually doing something productive.” Her victory that year was one of several by Democratic women with military or intelligence backgrounds, a group of newcomers that included Mikie Sherrill, who on Tuesday won the governorship in New Jersey. In her first term, Spanberger confronted the reality of a polarized Congress. She was among several centrists who voted against Nancy Pelosi for speaker of the House, only to be tarred later by the right for voting too often with Pelosi. She supported a $4.6 billion humanitarian aid package for migrants, but immediately faced criticism for not pushing harder for more restrictions on the Trump administration’s border policies. Her proclivity for navigating between the extremes on the left and the right is part of her appeal, said Denver Riggleman, a former Republican member of Congress from Virginia who, since leaving office, has become an independent and endorsed Spanberger for governor. “I think Abby does represent the Virginia way,” said Riggleman, using the timeworn phrase for Virginia’s self-conception as a commonwealth that stands above the muck of raw politics. While Spanberger could be a stubborn adversary on issues they disagreed on, Riggleman said, the legislation she championed in Congress, like a bill expanding rural broadband access, was more pragmatic than provocative. “She has a vision of the USA that I sort of do, that it is possible to get away from this binary ludicrousness,” he said. The race this year, at least at the top of the ticket, was not particularly suspenseful. In Virginia, governors cannot serve two consecutive terms, meaning the moderately popular Republican incumbent, Glenn Youngkin, was leaving. Virginia’s elections for governor, which take place a year after the presidential contest, tend to favor the party out of power at the White House, meaning any Democrat would probably have an advantage. Earle-Sears was not seen as a strong enough candidate to overcome this natural disadvantage, and nothing in Spanberger’s centrist record seemed likely to squander it. When controversies did arise during the campaign, Spanberger quickly issued statements and moved to distance herself. She expressed “disgust” when The National Review revealed a series of text messages sent in 2022 by Jay Jones, the Democratic candidate for attorney general, that wished violence on his Republican rivals. But she neither professed unqualified support for Jones, as some Democrats did, nor did she formally rescind her support, as some Republicans demanded. When Democratic lawmakers announced a plan to redraw the state congressional map in their party’s favor, she described it in an interview as simply a way to keep options open in the future. Otherwise, she kept her campaign speeches focused on jobs and affordability. In the end, it worked, and then some. “Just a few minutes ago, Adam said to our daughters, ‘Your mom is going to be the governor of Virginia,’” Spanberger said in her victory speech. “And I can guarantee those words have never been spoken in Virginia.”