/ Updated  / Source: Reuters

North Carolina Governor Pat McCrory's campaign criticized his Democratic challenger on Wednesday for claiming victory in the state's neck-and-neck gubernatorial race, saying tens of thousands of votes had yet to be tallied.

North Carolina Governor Pat McCrory tells supporters that the election results of his contest against Democratic challenger Roy Cooper will be contested, while his wife Ann looks on, in Raleigh, North Carolina, U.S. November 9, 2016.JONATHAN DRAKE / Reuters

Roy Cooper, the state's attorney general, declared victory after unofficial election results showed him leading the Republican incumbent by about 5,000 votes in the largest of the 12 U.S. states that elected governors on Tuesday.

McCrory's campaign, however, said the outcome of the race will not be known until outstanding absentee, military and provisional ballots are counted, a process expected to extend into next week.

"Claiming an outcome before the process has concluded is irresponsible and disrespectful to the voters of North Carolina whose voices have yet to be heard," McCrory campaign strategist Chris LaCivita said in a statement.

The campaign and state Republican Party signaled that a legal fight could be ahead, calling into question why some 90,000 early votes in heavily Democratic Durham County were not uploaded until late Tuesday.

LaCivita said Republicans had "grave concerns over potential irregularities" in that county. North Carolina Republican Party Chairman Robin Hayes said dozens of lawyers would be deployed across the state to ensure the validity of every vote cast.

Cooper's campaign did not immediately respond to a request for comment. State Democrats said they expected his lead to grow as provisional ballots were counted.

Democratic gubernatorial candidate Attorney General Roy Cooper, left, and North Carolina Republican Gov. Pat McCrory participate in a live televised debate at UNC-TV studios in Research Triangle Park, N.C., Tuesday, Oct. 11, 2016.Gerry Broome / AP

The race in North Carolina was seen as effectively serving as a referendum on a state law that bans transgender people from using government-run restrooms that correspond with their gender identity and limits protections for gays and lesbians.

McCrory signed the law, known as House Bill 2, and maintained steadfast support for its bathroom provision despite the economic backlash against the state after it passed in March. Cooper called the measure discriminatory and said it should be repealed.

Voters interviewed at polls in North Carolina cited the law as a key factor in deciding which candidate to back.

McCrory "should have stopped the H.B. 2 nonsense. That was just an embarrassment to the state," said Republican voter Rick Carter, 28, an actuary in Winston-Salem who cast a ballot for Cooper.

Follow NBC OUT on Twitter, Facebook and Instagram.