North Carolina Gov. Pat McCrory conceded the close gubernatorial race on Monday to his Democratic challenger, Roy Cooper, concluding one of the last outstanding contests of the 2016 election nearly a month after voters cast their ballots.

The Republican incumbent had filed for a statewide recount last month, but lost virtually all hope of eking out a reelection victory when Cooper's lead had surpassed 10,000 votes last week -- and the threshold whereby state law allows McCrory to ask for a recount. As of Monday, Cooper was up by 10,563 votes, according to the North Carolina Board of Elections.

In a YouTube video released Monday, McCrory said it was "time to celebrate our Democratic process" and respect "the ultimate outcome of the closest North Carolina race in modern history."

"Despite continued questions that should be answered regarding the voting process, I personally believe that the majority of our citizens have spoken, and we now should do everything we can to support the 75th governor of North Carolina, Roy Cooper," McCrory said.

Cooper released a statement in response, thanking McCrory for his service to the state and noting, "while this was a divisive election season, I know still that there is more that unites us than divides us."

Governor-Elect Roy Cooper released the following statement on Governor Pat McCrory’s concession: pic.twitter.com/2nKjCaYY7w — Roy Cooper (@RoyCooperNC) December 5, 2016

The concession marks the end of a drawn-out process that saw McCrory’s campaign and supporters raise multiple questions about the legitimacy of the election results -- accusations his critics saw as an attempt to undermine the will of the voters.

McCrory filed complaints in about half of the state’s 100 counties but no evidence of widespread voter fraud ever came to light. All of those complaints were rejected by McCrory’s own Republican appointees serving on local county election boards.

Last week, the State Board of Elections -- also Republican-controlled -- ordered a recount in Durham due to a delay in the county’s returns being added to the statewide tally. According to the Raleigh News & Observer, the delay came because election workers entered information from ballot tabulators' paper tapes after they were unable to read data from six memory cards that also came from the tabulators.

Experts on the equipment told Durham officials that the paper tapes were reliable, and several political watchers believed the results would be unchanged after a county recount. Durham is one of the strongest Democratic counties in the state, and Cooper won it by a wide margin of 79 percent to 20 percent.

Having signed a spate of unpopular legislation that restricted voting, reproductive and LGBTQ rights, McCrory was greeted with a number of cheers following his decision to accept defeat on Monday.

“Pat McCrory’s reign of discrimination is finally over," said the Human Rights Campaign president Chad Griffin in a statement. The HRC had aggressively campaigned against House Bill 2, a measure McCrory signed that blocked transgender people from using government building bathrooms in accordance with their gender identities.

HB2 sparked a national backlash, with numerous boycotts from businesses, musicians and sports organizations. In one of the biggest repercussions for a state where college sports is almost a religion, the NCAA and ACC earlier this year relocated several championship games out of North Carolina over the discriminatory legislation.

"McCrory's stubborn and reckless support of HB2 cost him this election, and his defeat sends a powerful warning to lawmakers across the country that targeting LGBTQ people will not be tolerated,” added Griffin. "We look forward to working with Governor-elect Roy Cooper and fair-minded lawmakers to repeal HB2. It's way past time to repair the harm inflicted on North Carolina’s people, reputation and economy.”