Dan Bishop (R-North Carolina) narrowly defeated Democratic candidate Dan McCready in a special congressional election Tuesday. The traditionally Republican district’s seat in the House was vacant since the 2018 midterm election, where allegations of fraud prompted a do-over election.

According to the New York Times, the neck-to-neck race ended with Bishop winning 50.7% of votes, exactly 2% more than McCready. The difference boiled to down to just under 4,000 votes with 100% of precincts reporting.

Bishop is known for authoring North Carolina’s controversial “bathroom bill,” which required transgender people to use public bathrooms that matched the sex they were assigned at birth and rolled back many anti-discrimination laws protecting the LGBT community.

He is a strong supporter of Trump and has voiced support for the Mexican border wall. His campaign website describes him as a Christian, pro-life, gun owner who wants to lower taxes.

Trump took credit for Bishop’s victory in a tweet late Tuesday night, saying three weeks ago he had been trailing McCready by 17 points. No polls had ever shown that great of a difference, and analysts had said the race was too close to call ahead of time.

McCready had lost in the original election as well, losing to Republican Mark Harris by a mere 905 votes. However, an investigation into voter fraud by Harris’ campaign contractor,  Leslie McCrae Dowless Jr., revealed that Dowless had paid workers to collect absentee ballots, violating state laws that prohibit anyone other than the individual or their close relative from turning in an absentee ballot. On July 30, Dowless was indicted on the charges of obstruction of judge and illegal possession of an absentee ballot.

Harris has denied any connection to the scandal, but declined to run in the do-over election, citing his poor health.

Republicans have held this district since 1963, so losing it would lessen the GOP’s chances of regaining the House majority. Republican PACs including the National Republican Congressional Committee and Congressional Leadership Fund spent over $5 million to help ensure his victory. Between Bishop and McCready, outside sponsors donated over $10 million, the second-most ever for a Congressional special election.

While North Carolina is often considered a “swing” state, the Tuesday election reaffirmed its Republican leanings. The other congressional race in North Carolina’s third district resulted in a Republican victory for Greg Murphy (R-North Carolina).

The GOP securing two seats in the House could be a predictor for North Carolina’s presidential election.

However, at his weekly press conference on Tuesday, House Minority Leader Kevin McCarthy (R-California) cautioned against using the election results to predict future votes. “Special elections are just what they are: special,” McCarthy said.

WATCH BETO TAKEDOWN TRUMP: