Abigail Spanberger unseats incumbent Rep. Dave Brat in Virginia’s 7th Congressional District

Abigail Spanberger and Dave Brat during a debate in the race for Virginia’s 7th Congressional Distri...

Abigail Spanberger pulled off an upset victory on Tuesday night, unseating incumbent Republican Rep. Dave Brat to become the next representative for Virginia’s 7th Congressional District.

Spanberger — a former CIA operative and political newcomer — beat Brat 49.7% to 49.1% with 99% of precincts reporting, according to the Associated Press.

The victory rivals Brat’s own stunning upset in 2014, when he defeated then-House Majority Leader Eric Cantor in the Republican primary and subsequently cruised to victory in that year’s midterm election.

The race had long been considered a virtual toss-up, with the candidates going round-for-round on health care, immigration and gun control during one contentious debate, during which Brat invoked House Minority Leader Nancy Pelosi and her “liberal agenda” no less than 25 times.

The closeness of the race was reflected in its viciousness. In August, Spanberger accused a super PAC associated with House Speaker Paul Ryan of accessing her federal security clearance application from her time in the CIA and using the information contained within it to vet her background.

And in October, the Spanberger campaign was forced to issue an apology after several teenaged canvassing volunteers left a note on Brat’s front door that read, “Rot in hell Dave.”