North Carolina's newest congressman has officially been sworn into office after winning a special election last week.

WASHINGTON, D.C., USA — (AP) — House Speaker Nancy Pelosi has sworn in two Republicans who won special elections in North Carolina last week.

One is conservative Dan Bishop. As a state legislator, he wrote North Carolina's 2016 law restricting which public bathrooms transgender people may use. It was later repealed.

The law was repealed after it prompted a national outcry and boycotts that The Associated Press estimated cost North Carolina $3.7 billion.

Bishop won a district that stretches eastward from Charlotte by 2 percentage points. Donald Trump carried the district by 11 points in the 2016 presidential election.

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

Bishop did poorly among suburban voters but well with rural residents. That continued a trend that could wound the GOP as it tries retaining the White House and strengthening their numbers in Congress in 2020.

President Donald Trump called Bishop the night of the election to congratulate him while Bishop was on stage. Bishop put Donald Trump's call on speaker phone for his supporters to hear.

After his swearing-in ceremony, he told reporters he will continue to stand behind Trump.

"I certainly will look for opportunities to defend the President and to urge that those who seem to be consumed with the idea of destroying the president, we have a lot of important common-sense work to do and we ought to get to that," Bishop said.

Also sworn in was Republican Greg Murphy. The physician and state legislator was easily elected in a strongly GOP coastal district.