Republican Dan Bishop defeated Democrat Dan McCready in a close special election in North Carolina’s ninth congressional district Tuesday night.

With 99 percent of precincts reporting, Bishop defeated McCready by slightly more than two points, with 50.8 percent of the vote (94,984 votes) to McCready’s 48.6 percent (90,824 votes). Bishop’s total margin of victory was 4,160 votes.

Decision Desk HQ called the race for Bishop at 9:54 p.m. eastern, but no other media outlet had yet called the race.

Dave Wasserman, political editor of the Cook Report, called the race for Bishop at 9:55 p.m. eastern in this tweet:

Projection: Dan Bishop (R) defeats Dan McCready (D) in #NC09. GOP hold. — Dave Wasserman (@Redistrict) September 11, 2019

Both parties and their related groups spent heavily in this hotly contested bellwether election in this key 2020 battleground state.

According to an election night analysis provided by Decision Desk HQ, Republican and Republican aligned groups spent more than $6 million on behalf of Bishop’s candidacy, while Democrat and Democrat groups spent more than $3 million on behalf of McCready’s candidacy, and each candidate spent around $2 million. Total spending was about $14 million.

Bishop, a conservative Republican currently serving in the North Carolina State Senate, based his campaign on strong support for the Trump agenda. The president, for his part, strongly supported Bishop. On Monday, the night before the election, Trump appeared with Bishop at a boisterous rally in Fayetteville, North Carolina in the conservative eastern part of the district. At the rally, Trump heavily criticized McCready for supporting the socialist agenda of Speaker Nancy Pelosi and the Squad.

The uncertainty of the outcome of the special election in the Ninth Congressional District was in sharp contrast to the easy victory Republican candidate Greg Murphy won in the special election held on Tuesday in the state’s Third Congressional District.

The Ninth Congressional District seat in the U.S. House of Representatives has been empty since the 116th Congress convened in January, due to allegations of election ballot irregularities that caused the North Carolina State Board of Elections’ refusal to certify the results of the 2018 midterm election in the district between Republican Mark Harris and Democrat Dan McCready. On election night, Harris held a 905 vote lead. In January, the NCSBE ordered this new special election to be held.

For all the spending by both parties, the voting behavior in this special election almost mirrored that of the November 2018 mid term election.

The Ninth Congressional District consists of all or part of eight counties, stretching from Mecklenburg County (Charlotte) on its western boundaries to Bladen County on its eastern boundaries. In 2016, President Trump defeated Hillary Clinton in the district by 12 points. He won the state of North Carolina by three points.

Half of the 50 precincts in Mecklenburg County are in Bishop’s current State Senate district.

If the final margin of victory is less than one percent, the losing candidate can request a machine recount within 48 hours of the closing of the polls. If that machine recount changes the outcome, the candidate who is the loser after that recount.

McCready had a lead in early voting, but it turned out not to be enough, as Politico’s Jake Sherman noted in this tweet:

For what it’s worth — before vote came in today, a smart NC person told me if McCready was up by 8000 or more in early vote total, Bishop would not be able to make that up. McCready was up by 7,373. — Jake Sherman (@JakeSherman) September 11, 2019

The vote totals, by county, with 86 percent of precincts reporting as of 9:50 p.m. eastern time were:

Union – Bishop 36,165 McCready 23,751

Mecklenburg – Bishop 24,081 McCready 31,615

Robeson – Bishop 9,454 McCready 10,054

Cumberland – Bishop 4,311 McCready 4,862

Richmond – Bishop 4,713 McCready 4,276

Scotland – Bishop 2,804 McCready 3,644

Anson – Bishop 2,375 McCready 3,159

Bladen – Bishop 2,041 McCready 1,716