UNION COUNTY, N.C. - Dan Bishop beat Democrat Dan McCready and two other candidates Tuesday in the 9th Congressional District, which has been held by Republicans since 1963.
The race was seen as a measure of popularity for Trump, who campaigned for Bishop on Monday in Fayetteville.
The 55-year-old Bishop is a state senator best known for sponsoring a 2016 state law that blocked local anti-discrimination rules protecting LGBT residents. The law was repealed after it prompted a national outcry and boycotts that The Associated Press estimated cost North Carolina $3.7 billion.
"I'm going to roll up my sleeves and get to work on behalf of the families and the taxpayers of the 9th district," Bishop told supporters at a victory rally Tuesday night.
Bishop didn't run in last year's election, which was scrapped after allegations of ballot tampering by a Republican political consultant.
The North Carolina State Board of Elections held an emergency meeting 15 minutes before polls closed Tuesday and voted to extend voting time by 25 minutes for Precinct 220 in Mecklenburg County only due to a gas leak.
North Carolina Republicans and the Bishop campaign filed a motion to extend voting time in part of Union County over what the campaign called "voter confusion" regarding Precinct 30. NC BOE held an emergency meeting at 6:15 p.m., but a motion was not brought forward. Polling locations closed at 7:30 p.m., as planned.
President Trump, who appeard in North Carolina to support Bishop, tweeted about the victory.
"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 to talent out. Stay tuned!," the president tweeted.
Bishop a received a call from Vice President Mike Pence, who congratulated home on his win.
McCready also appeared before supporters, thanking them for their efforts in a campaign that had essentially lasted two years.
"Tonight, it’s okay to be disappointed and exhausted but it is not okay to give up," he said.
State officials ordered the unusual 9th Congressional District special election earlier this year, invalidating a win by GOP candidate Mark Harris over McCready in the 2018 midterms after uncovering ballot fraud efforts.
The Associated Press contributed to this report.