HENRICO, Virginia—Democrat Abigail Spanberger appears to have clinched a tight victory over conservative favorite Rep. Dave Brat by fewer than 2,000 votes in what had been a closely watched race on the way to the Democrats’ takeover of the House.

The 7th Congressional District, based in suburban Richmond, has been historically Republican.

Spanberger, a former CIA case officer and first-time candidate, outraised the incumbent Brat in campaign cash by a reported 3-to-1 margin.

Just before 10:30 p.m., Brat campaign adviser Phil Rapp announced that the incumbent would not concede on election night.

“We’re going into overtime,” Rapp said, adding that the campaign will ask for a recanvass. “We do know that we will prevail and work through this.”

After midnight, with 99 percent of precincts reporting, Spanberger led 50.1 percent to Brat’s 48.7 percent.

Libertarian candidate Joseph Walton may have been a factor, pulling 1.3 percent.

Spanberger declared victory to her supporters.

“We succeeded at the polls tonight because voters rejected the politics of hate, the politics of division, and the politics of ideology,” Spanberger said. “Voters chose our campaign, our message because we were steadfast in our focus on the policies that are important to the lives and because we remained committed to providing them with the kind of engaged leadership they deserve.”

As of 1:30 a.m. Wednesday, with results still being counted, Democrats had gained three more seats than the 23 they needed to regain control of the House for the first time since 2010. (In the Senate, Republicans had picked up four seats–in Florida, Indiana, Missouri, and North Dakota–to increase their majority.)

Brat had easily won his two previous general elections after becoming a conservative star on the national stage as the obscure economics professor who shockingly ousted then-House Majority Leader Eric Cantor from the seat in a primary fight in 2014.

The Brat-Spanberger race was close throughout the night, with a high turnout that prompted some polling places to remain open late after cutting off anyone who arrived after the 7 p.m. deadline.

Brat took an early lead after polls closed, staying up about 1 percent until shortly before 9 p.m., when Spanberger began to pull ahead by just more than 500 votes.

As it turns out, Cantor might have fit the district better, said Kyle Kondik, managing editor of Sabato’s Crystal Ball at the University of Virginia’s Center for Politics.

“It’s a district that is mostly college-educated and well off and has been mostly Republican—though not the kind of Republicans that always support President [Donald] Trump,” Kondik told The Daily Signal.

“Not only do some of these Republican voters dislike Trump, but they liked Cantor more than Brat. Trump carried the district by 6 points, but Mitt Romney carried it by 10.5 points in 2012,” he said.

Spanberger’s victory wasn’t entirely a referendum on Trump, nor only a matter of changing demographics, Kondik said.

She was a credible challenger with a strong bio as a former CIA official.

“If Spanberger wins this race, it suggests Democrats will win the House,” Kondik said before the results, and indeed they had pulled out a narrow majority by 10 p.m.

“If Brat wins, it doesn’t suggest Republicans will keep the House,” he also said. “But it says it may not be as bad a night as it might have been.”

Brat, a vocal member of the House Freedom Caucus, a group of that chamber’s most conservative members, has been a Trump ally on key issues such as tax reform and immigration enforcement.

Max Ilijevich, who works at Carytown Burger and Fries in Richmond, said he would have preferred a more progressive candidate than Spanberger, but said she has a good background and he wanted to vote against Brat.

“Dave Brat hasn’t done anything for the district,” Ilijevich told The Daily Signal. “Brat just wastes his time talking about what’s constitutional and what’s not, and never does anything for his district. She’s not as progressive as I’d like her to be, but she’s a strong candidate.”

For others, such as Taylor DeSaddle, a student at Virginia Commonwealth University, the result was a major disappointment.

“I love his economic policy and his term-limits policy,” DeSaddle told The Daily Signal. “I think too many people serve in government too long. I think he can really help Virginia.”

Spanberger’s background with the CIA was key to her candidacy, making it more difficult to paint her as a liberal, said Quentin Kidd, dean of the college of social sciences and director of the Wason Center for Public Policy at Christopher Newport University, which polled the race.

“The CIA background gives her credibility, similar to how military service gives credibility,” Kidd said. “She has run a really good campaign and has aggressively raised money. Most candidates have to start out running for school board or city council. She jumped straight into a congressional campaign.”

The 7th District has seen changing demographics for a while, but it has been under the radar, Kidd said.

“Cantor was a strong incumbent in this district who was unbeatable until he wasn’t, and when Brat won the seat, the demographic changes became more evident,” Kidd said. “Brat has behaved like Trump in office. He has sought favor with his base, but hasn’t worked to expand his base.”

A group calling itself the Liberal Women of Chesterfield County has been a major “resistance” organization gunning for Brat.

“This fits the geography of what we are seeing across the country,” Kidd said. “College-educated women are really engaged in Henrico and Chesterfield counties.”

A Christopher Newport University poll in late October found a wide gender gap, with men backing Brat by 13 points and women backing Spanberger by 16 points.

Eve Pollard, of Henrico, said she voted for Spanberger and other Democrats because of abortion rights.

“I used to vote Republican, but I voted all Democrat this year,” Pollard told The Daily Signal. “I used to be on the fence about abortion rights, but now that the situation is so dire, I felt I had to preserve the right. I would never get one myself, but I don’t want women to lose that option.”

“I like Spanberger, and Dave Brat doesn’t rub me the wrong way,” she said. “After seeing documentaries, I just think the situation is dire.”

Another disappointed voter was Raymond Hagenbutch, of Chesterfield County. Hagenbutch campaigned for Brat outside polling places with his dog Rainy. The dog wore a Dave Brat T-shirt.

Hagenbutch noted that Brat co-sponsored legislation to restrict commercial research on animals.

“Rainy can’t vote, but Dave Brat spoke up for those that can’t speak for themselves,” Hagenbutch said jokingly.

But the nation’s fiscal future was key, he added.

“There is too much spending, and Dave Brat is an economics professor,” he said. “We are billions in debt. Dave is an economics professor and could be a pastor. He’s just what we need.”