Democrat Conor Lamb at an election-night rally in Canonsburg, Pa., on  March 14. His Republican rival, Rick Saccone, conceded defeat in the special election a week later. (Andrew Harrer/Bloomberg News)

Republican candidate Rick Saccone conceded defeat in the tight race for Pennsylvania’s 18th Congressional District, clearing the way for Democrat Conor Lamb to be sworn in next month.

“Just got off the phone with my opponent,” Lamb announced on Twitter, “who congratulated me & graciously conceded last Tuesday’s election. I congratulate Mr. Saccone for a close, hard-fought race & wish him the best.” A spokesman for Saccone confirmed the call and the concession.

Lamb’s victory, in a district that Saccone often referred to as “Trump country,” had rattled Republicans and raised questions about the president’s ability to turn out his base. The president had carried the 18th District by nearly 20 points; it fell to Democrats after Republicans spent more than $10 million to save it.

The president made two trips to the district, once to promote the Tax Cuts and Jobs Act and once to campaign for Saccone. At a Tuesday fundraiser for the National Republican Congressional Committee, which raised more than $32 million, the president took credit for closing the gap in an election the party had nearly written off.

Last week, Saccone and Republicans had suggested they might seek a recount, and had asked county clerks to preserve ballots in the event of a legal challenge. Saccone, an Air Force veteran, said that he would not concede until military and overseas votes were added to the count.

Those ballots only confirmed Saccone’s defeat. The state’s official vote count, which began on Friday, found Lamb adding to his lead. What had been a 627-vote lead on election night grew to more than 800 votes by Wednesday.

After the vote is certified, which could happen as early as March 26, Lamb will represent the Pittsburgh-area district through the end of the year. Both he and Saccone are now candidates in new districts drawn by the state Supreme Court after it overruled a Republican-drawn map – Lamb in the evenly divided 17th District, Saccone in the deep red 14th District.

The Democratic Congressional Campaign Committee, which had declared victory for Lamb on election night, took a victory lap on Wednesday. DCCC chairman Rep. Ben Ray Luján (D-N.M.) said in a statement that Democrats would work to re-create Lamb’s upset across the country.

“There are more than one hundred districts more favorable for Democrats than this one and we look forward to competing hard in every single one,” Lujan said.