Rep. Robert Pittenger (R-N.C.) with Vice President Pence (left) after a tax policy event in Charlotte on Friday, April 20, 2018. Pittenger lost the Republican primary on Tuesday, May 8, 2018. (AP Photo/Chuck Burton)

Republican Rep. Robert Pittenger of North Carolina lost his primary bid on Tuesday, becoming the first incumbent of either party this year to be forced out of Congress.

With 99 percent of precincts reporting in North Carolina’s 9th District, former pastor Mark Harris had won 48.5 percent of the vote to Pittenger’s 46.2 percent. The race was a rematch; Pittenger had run just 134 votes ahead of Harris in a 2016 primary, with a third candidate splitting the vote.

“I’ve called Mark Harris, I’ve conceded the race, and I wish him the best,” Pittenger told reporters in the Charlotte suburbs shortly after 10 p.m. The Associated Press called the race for Harris shortly thereafter.

Pittenger’s defeat nonetheless came as a surprise to House Republicans, who figured the incumbent had shored up support in the district after a shaky start. Harris had been outspent by a 2-to-1 margin and canceled some ad buys in the final weeks.

But Harris upset Pittenger by portraying him as a Washington “swamp” native — Pittenger was serving his third term — and criticizing his vote for the $1.3 trillion spending bill reluctantly signed by President Trump in March.

“The vote to ram that thing through only passed 211 to 207, and Mr. Pittenger voted for that,” Harris said in an interview last week. “One vote makes a difference.”

Pittenger fought back by presenting himself as a strong ally of the president, attacking Harris for having endorsed Sen. Ted Cruz (R-Tex.) for president in 2016. On the trail, he said that the president needed an ally and that, like the president, he’d backed the spending bill because of the need to increase funding for the military.

“He’s done a masterful job on the economy, as well as on his handling of international threats,” Pittenger said in an interview last week. “Any thoughtful person would look at that record and say: This is an amazing year of accomplishment.”

Harris argued that he would be just as strong for the president — he had campaigned for him after Cruz lost the nomination — and argued that Pittenger would be less electable in November. The Charlotte Observer, which backed Pittenger in 2016, endorsed Harris this year. The race, according to the paper, was between a “straight shooter” insurgent candidate and an incumbent who had “repeatedly embarrassed his district” with gaffes.

“I don’t bring that baggage to the race,” Harris said. “I can articulate the values that we stand for as conservatives.”

Harris will now face Dan McCready, a veteran who recently became a Democrat, who easily won the Democratic nomination in the district. According to the last FEC filings from both campaigns, McCready had $1.2 million for the general election; Harris had a little over $70,000.

Democrats were also buoyed by the turnout in the district, which had been drawn to elect a Republican and which had backed Trump over Hillary Clinton by 11.6 points. Just 35,494 votes were cast in the Republican primary, while 45,660 votes were cast in McCready’s primary. But Republicans remained confident that they would hold the seat.

“Republican voters are anxious to drain the swamp, and the best person to make that case will often prevail,” said Rep. Mark Meadows (R-N.C.), the chairman of the House Freedom Caucus, which had opposed the spending bill. “Tonight is a reminder that we all serve at the pleasure of the American people and it is a temporary job.”

Mike DeBonis contributed to this report.