FAYETTEVILLE, N.C. — A Republican state legislator has won an eastern North Carolina congressional seat and will succeed the late GOP Rep. Walter Jones Jr.

Physician Greg Murphy defeated Democrat Allen Thomas and two other candidates on Tuesday in the 3rd Congressional District race.

Murphy is a state House member who survived a 17-candidate Republican primary in April and a July runoff. Jones died in February after 24 years in Congress.

The GOP-leaning district extends from the Virginia border and Outer Banks to the Marine Corps' Camp Lejeune, and inland to Greenville. President Donald Trump won the district vote comfortably in 2016, and Murphy said at a Trump rally that he would have the "president's back" if elected.

Thomas is a former Greenville mayor who questioned Murphy's "blind loyalty" to Trump.

Murphy said President Donald Trump called to congratulate him on his victory.

He won by a comfortable margin Tuesday in the coastal 3rd Congressional District over Thomas, a former mayor of Greenville. Murphy will succeed the late Rep. Walter Jones Jr., whose death in February led to the special election.

Murphy said Trump called him Tuesday to say he "loves eastern North Carolina and looks forward to us working together to help the region."

That victory was expected, and all eyes were on another House race in the state that could provide clues about Trump's reelection prospects and Republican chances of retaking the House in 2020.

Dan Bishop, a Republican who aligned himself closely with President Donald Trump, won a do-over North Carolina congressional election in the 9th Congressional district forced after findings of ballot fraud.

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.

Bishop didn't run in last year's election, which was scrapped after allegations of ballot tampering by a Republican political consultant.

The Republican National Committee said in a statement:

Congratulations to Greg Murphy and Dan Bishop on their victories in today’s special elections. President Donald Trump’s strong leadership, record-breaking economy and his vision for the country is clearly resonating with North Carolina voters while the socialist, open border policies espoused by Democrats were soundly rejected tonight and they will be again in 2020.