After years of successfully holding off Democratic gains in this rapidly changing state, Republicans are scrambling to pour new resources into North Carolina in the face of unexpectedly close contests in the presidential and Senate races.

Republicans here are increasingly nervous about the prospects in November for both presidential nominee Donald Trump, who held a rally in Asheville on Monday evening, and Sen. Richard Burr, who is in a tight race with a relatively unknown Democratic opponent. The state’s Republican governor, Pat McCrory, also is in danger of losing his reelection bid.

It’s a dramatic change in fortune for a party that had reasserted control of North Carolina after President Obama narrowly won the state in 2008. Republicans enacted a wave of conservative policies, including imposing new voting restrictions and overruling protections for gay and transgender people. The rightward shift was particularly notable in a state that is gaining Hispanics and young white professionals at a rapid pace, following in the wake of its neighbor to the north, Virginia.

But North Carolina Republicans have been badly outgunned this year. Hillary Clinton and her allies have outspent Trump and groups supporting him 7 to 1 on television ads so far, and Chelsea Clinton will be in the state Tuesday to open the Democrats’ 31st North Carolina campaign office. The coordinated Republican campaign to help Trump, by comparison, has no offices in North Carolina at all; the national party and Trump will open their first three locations later this week.

The Washington Post spoke to veterans in the battleground state of North Carolina about the upcoming election and their choice for the next commander-in-chief. (Dalton Bennett/The Washington Post)

“Donald Trump has a different way of approaching the national campaign,” said Art Pope, an influential North Carolina Republican donor who backs neither Trump nor Clinton. “I think he’s mistaken. I do think you need a ground game. You need more than social media and rallies.”

Republicans’ intensifying focus on North Carolina comes as their chances in several other battle­ground states have improved in recent weeks, particularly at the Senate level. Polls show GOP senators in Florida and Ohio running well ahead of Trump, boosting Republicans’ hopes of avoiding a scenario in which a Trump loss washes away down-ballot candidates.

More than a quarter of the 392 field staffers the Republican National Committee recently added nationwide have been assigned to North Carolina to help Trump and other Republicans there, according to Kara Carter, the RNC’s North Carolina communications director.

Meanwhile, Americans for Prosperity, a conservative nonprofit group backed by the billionaire Koch brothers, recently decided to shift its resources in the state to help Burr and go after his Democratic challenger, Deborah Ross. The group had previously been focused on helping McCrory and on unseating GOP Rep. Renee L. Ellmers, who lost her primary.

Adding to the Republicans’ challenge: Clinton and her allies have blanketed the airwaves, buying or reserving about $21 million worth of television ads in the state since late July, according to Republicans and Democrats tracking ad spending. Trump and his supporting groups have spent or reserved only about $3 million during the same period.

“I haven’t seen many Trump ads. I’ve seen a lot of Hillary ads,” Mary Simpson, 53, of Kinston, N.C., said after attending a Trump rally in Greenville last week.

In the Senate race, polls show Burr holding a small lead over Ross. But many Republicans here complain that Burr is not campaigning aggressively enough and should be much more comfortably ahead of Ross, a little-known civil-liberties advocate who emerged only after Democrats were unable to recruit others to run.

North Carolina Gov. Pat McCrory, left, and Attorney General Roy Cooper, right, speak to the North Carolina Bar Association during a candidate forum in Charlotte, N.C., June 24, 2016. The two men will face each other in the November election for governor in what could be the most expensive gubernatorial election this year. (Chuck Burton/AP)

In the governor’s race, surveys show McCrory trailing his Democratic challenger, Attorney General Roy Cooper. Many Democrats believe turnout could be boosted by McCrory’s decision to sign a law requiring transgender people to use bathrooms corresponding with the gender on their birth certificate, which has prompted a court challenge and boycotts.

The RNC says it will have 172 staffers on the ground this month in North Carolina to help Trump and fellow Republican candidates — a big uptick from this point in 2012.

Clinton officials declined to say how many staffers the campaign has in North Carolina. They said the coordinated Democratic campaign has 30 North Carolina offices, with another opening Tuesday in Durham with Clinton’s daughter on hand.

Republican officials sought to play down the disparity in the number of brick-and-mortar offices, maintaining that they are focusing on face-to-face contacts with voters at their homes.

“Office numbers are a false metric and completely miss the point that, as we saw in the primary, Mr. Trump is not a typical politician,” Jason Simmons, Trump’s campaign director in the state, said in a statement. “We will have all the offices, staff and resources we need to win.”

Democrats see it differently.

“The offices aren’t just about phone banking,” said Thomas Mills, a Democratic blogger who is running for Congress in the 8th District. “If you watch what happens in there, they are the center point for your whole ground operation. What they are doing right now is registering voters on a massive scale in North Carolina.”

There was some turbulence in Trump’s North Carolina operation in the months after he clinched the Republican nomination in May. Simmons took over in the summer for Earl Phillip, who was accused in a lawsuit of pointing a gun at a former Trump staffer.

The decision by Americans for Prosperity direct resources to the Senate race reflects the national importance of the contest and nervousness among GOP leaders about Burr’s campaign. The Koch-backed group is known for using TV ads, mailers and field staff to attempt to influence the outcome of targeted races.

“We do not to take anything for granted, so we are now making sure voters understand the differences between Senator Burr and his opponent,” said Tim Phillips, president of Americans for Prosperity.

Burr, who is chairman of the Senate Intelligence Committee, has taken a different approach than embattled Republican colleagues who have been feverishly campaigning for months. Most of his events in recent weeks have been arranged by his Senate office, and he has said that Senate business is his first priority.

“I become a candidate on October 7, when the United States Senate is adjourned,” Burr, who is running for a third term, recently told the Associated Press.

“It’s surprising to me that Burr didn’t define Deborah Ross earlier. There’s almost been a failure to engage up until recently,” said Marc Rotterman, a veteran of Ronald Reagan’s 1980 campaign and an experienced North Carolina hand. “Having said that, I still think he’s the favorite.”

Burr spokesman Jesse Hunt said in a statement, “North Carolinians want to see him doing the job they elected him to do and his legislative accomplishments have had a positive impact on individuals all across the state.”

Ross, a former director of the North Carolina chapter of the American Civil Liberties Union, has run TV ads accusing Burr of casting votes prioritizing the needs of special interests and himself over average North Carolinians.

Republicans believe that a key to victory will be to define Ross as too extreme for the state because of her work with the ACLU. They have seized on her past concerns that putting a sex-offender registry online might also expose victims who are supposed to be protected, since many such crimes involve family members.

If Trump continues to let Clinton and her allies lap him in ad spending, his best chance for capturing voters’ attention might be in media coverage of events like his Monday arena speech here in Asheville. The atmosphere was tense, with protesters seeking to disrupt the proceedings at regular intervals. In his remarks, Trump encouraged voters to cast their ballot early, beginning on Oct. 20, or on Election Day.

“It’s our last chance to take it back,” Trump said. “In my opinion, it’s our last chance — I really believe that. It’s our last chance to take it back, to fix our rigged system.”

Republicans say he must convince voters that he will be a steady, trusted leader to counter the doubts Democrats are trying to sow about his judgment.

“He has to demonstrate that and not just say it,” said longtime North Carolina Republican strategist Carter Wrenn.