By Jim Morrill and Craig Jarvis

Republican Gov. Pat McCrory and Democrat Roy Cooper turned back their primary opponents Tuesday, setting up what’s expected to be one of the closest and hardest fought gubernatorial races in the nation.

McCrory defeated two challengers but lost some votes in north Mecklenburg, where Republicans angered over tolls on Interstate 77 sought to deliver a message to the governor.

McCrory defeated former state lawmaker Robert Brawley of Mooresville and Randleman businessman Kenneth Moss.

In the Democratic race, Cooper, the attorney general, beat Durham businessman Ken Spaulding.

Neither wasted any time in launching attacks against their new opponent.

Cooper was already seeking to tie McCrory to Donald Trump, who was leading the GOP presidential field in the state.

“I’m honored to receive the nomination of the Democratic Party tonight,” Cooper said in a statement. “For too long, we have seen Gov. McCrory hand out tax giveaways to the large corporations at the expense of public education and the middle class. But the damage done is only a hint of what's in store under a Trump, McCrory Administration.”

McCrory had yet to speak. But a spokesman for the Republican Governors Association called Cooper “an out-of-touch career politician … with a consistent record of supporting bigger government, higher taxes, more regulation, expanding Obamacare and other liberal job killing policies.”

“I expect the governor’s race in North Carolina to be the most closely fought in the country,” said Jennifer Duffy, an analyst with the Cook Political Report. “I’d be very surprised if it ever gets out of the margin of error in public polls.”

It could also be one of the most expensive races. This month Cooper reported $5.7 million cash on hand and McCrory, $4.3 million. Both candidates vastly out-raised their primary opponents.

In his campaign, McCrory touted the “Carolina Comeback.” He boasted an economy that added more than 20,000 manufacturing jobs and an administration that cut taxes and paid off a $2.5 billion unemployment insurance debt to the federal government ahead of schedule.

Brawley advocated more transparency in state government and pledged to fight public private partnerships, especially the toll lanes. For many Republican voters, he became the vehicle for anger at McCrory’s administration for signing a 50-year toll contract with a subsidiary of the Spanish firm Cintra.

On Tuesday, the group called Lake Norman Conservatives passed out thousands of voter guides backing Brawley and other conservatives. And John Hettwer, a former chair of the Lake Norman Chamber, distributed 15,000 fliers that said, “McCrory = tolls.”

“What we’re trying to do is send a message that he can’t walk away from the stong Republican pockets of north Mecklenburg,” Hettwer said. “There’s a lot of people feel they would rather have four years of Roy Cooper than 50 years of this contract.”

Dave Windley, an Army National Guard chaplain from Huntersville, voted for McCrory in 2012. But tolls were the biggest reason he went for Brawley Tuesday.

“I felt if they could widen I-85 with no issues,” he said, “I didn’t see why I-77 should be any different.”

Cooper has weighed in. With a Cintra subsidiary in Texas facing bankruptcy, he said McCrory should cancel the toll contract and said he wouldn’t have signed it in the first place. Administration officials argue that the attorney general’s office reviewed the contract before it was signed.

In the primary, Spaulding criticized Cooper for defending laws passed by the Republican-controlled General Assembly, including laws requiring voter IDs and allowing magistrates to recuse themselves from officiating at gay marriages. Though Cooper publicly disagreed with many of them, he said his office has a constitutional duty to defend them.

Spaulding, an African American, specifically courted black voters. He criticized Cooper for not re-trying former Charlotte police office Randall Kerrick, whose trial for killing an unarmed black man resulted in a hung jury.

“He has done what a lesser-known challenger has had to do,” said Jarvis Hall, political scientist at North Carolina Central University. “He has tried to bring attention to his campaign.… He’s pointed out those issues that affect the black community … His problem is name recognition outside of Durham.“

For his part, Cooper focused almost exclusively on McCrory and GOP lawmakers.

“North Carolina has gone off the tracks,” he told a group of Charlotte Democrats last month. “I love this job, but when I saw what’s been happening to my state … I knew I had to step up and do this.”

Cooper is trying to become the first candidate to unseat an incumbent N.C. governor since the state first allowed governors to run for more than one term nearly four decades ago. Duffy, of the Cook Report, said McCrory is the nation’s only vulnerable incumbent.

Polls consistently show the race close. One last month had McCrory up by 3 points. Another showed Cooper up by 2.

“This race for governor will be one that should receive a great deal of national attention,” said Hall. “One, because it’s so close. Two, it is North Carolina, and North Carolina is still a swing state.”