The Republican candidate appeared to be heading for a narrow win in a special election in North Carolina with two-thirds of the votes counted after a last-ditch attempt by President

to keep a seat Republicans had held since 1963.

North Carolina’s 9th District U.S. House seat was up for grabs after allegations of voter fraud in 2018 left it empty. The close race could offer a preview of the 2020 election when Democrats in swing districts will try to distance themselves from their party’s leftward swing. With 95% of the vote counted, Republican candidate Dan Bishop was leading by 1.8%.

Dan McCready, 36, a moderate Democrat, was vying to flip a seat the GOP had had a lock on since John F. Kennedy's presidency. He was facing state senator Bishop, 55. Trump held a rally in Fayetteville on Monday night and Vice President Mike Pence and the president's eldest son Don Trump Jr. also flew in to stump for Bishop.

More than $10.7M was poured into a race with significant implications for the 2020 presidential cycle. Bishop had fully endorsed Trump, who carried the district by 12 points in 2016, the same margin of victory for GOP nominee Mitt Romney in 2012.

The race pitted Bishop’s pro-Trump message against McCready’s efforts to distance himself from his own party’s recent leftward swing and pursuit of impeaching the president.

“This is a test drive,” North Carolina political strategist Lawrence Shaheen told the Washington Examiner before the vote. “The messages that Dan Bishop and Dan McCready are using will be mirrored by the messages of the national parties, ultimately, in 2020.”

McCready, an Iraq War veteran, had pledged to vote independently no matter the demands of the House Democratic leadership led by Speaker Nancy Pelosi, of California. His campaign slogan was “Country over Party,” and he touts his background as a Marine and small business owner.

“When I built a business or served in the Marines, we never cared if you were a Democrat or a Republican,” McCready told voters in campaign literature. “We cared about getting the job done. It’s time we had new leaders who put country over party — and got the job done for North Carolina families.”

House Democrats elected from swing districts are expected to align their strategy with McCready’s. In 2020, Democrats will be defending three dozen seats in competitive districts, many of them won by defeating Republicans in 2018.

Many moderate Democrats fear they are at risk of losing their seats in 2020, in part because the Democratic Party and the party's large presidential field has swerved to the left of their own constituents on major policy issues such as guns, healthcare and climate change.

The special election was called after the state elections board found evidence that a contractor for the original Republican candidate, Mark Harris, illegally collected and filled out absentee ballots. A new election was called and Harris decided to not run in the special election opening the door for Bishop to face McCready.

Trump on Tuesday night wasted no time talking up Bishop's win and touting his own role, including a campaign rally the night before. He also jabbed at news networks over their coverage of the race.

"Dan Bishop was down 17 points 3 weeks ago. He then asked me for help, we changed his strategy together, and he ran a great race. Big Rally last night. Now it looks like he is going to win. @CNN & @MSNBC are moving their big studio equipment and talent out. Stay tuned!" Trump tweeted.

