Supporters of the legislation gather outside the North Carolina State Capitol in Raleigh.

April 11, 2016 Supporters of the legislation gather outside the North Carolina State Capitol in Raleigh. Gerry Broome/AP

The new state law mandates that transgender people use the public restroom that correspond with the gender on their birth certificate.

The new state law mandates that transgender people use the public restroom that correspond with the gender on their birth certificate.

The new state law mandates that transgender people use the public restroom that correspond with the gender on their birth certificate.

See supporters and opponents of the controversial ‘bathroom bill’ rally in N.C.

See supporters and opponents of the controversial ‘bathroom bill’ rally in N.C.

Gov. Pat McCrory is living the Republican Party’s identity crisis.

This week began when McCrory, looking pale from a virus, emerged from the executive mansion to tell reporters that he would not discuss the raging national controversy over the state’s new law rolling back local government protections for gay and transgender people — which he has been defending since he signed it three weeks ago.

McCrory referred to the matter only as the issue in which “I know there are people out on the streets.” After a few minutes listing his state budget priorities, he cut himself off and concluded: “I’m going to crawl back and continue to get rest.”

Then, Tuesday, McCrory backpedaled, issuing a surprising call for changes to the law — known as House Bill 2 — and signing an executive order to give state employees more nondiscrimination protections.

“After listening to people’s feedback,” he declared in a video posted on YouTube, “I am taking action to affirm and improve the state’s commitment to privacy and equality.”

North Carolina Gov. Pat McCrory explains his executive action on Apr. 12, after public outcry over the state's "bathroom bill." (Office of Governor Pat McCrory)

McCrory’s delicate dance shows how a Republican governor, elected four years ago by mobilizing a coalition of suburban centrists and rural conservatives, is struggling to navigate the wildly shifting contours of the modern-day GOP as he readies for a tough reelection campaign this fall.

The national intra-party battle over what it means to be a conservative — with billionaire Donald Trump and Sen. Ted Cruz of Texas offering near-opposite versions — is affecting state and local party officials such as McCrory, who are finding it difficult to gauge the mood of their supporters.

HB2 drew national attention for forcing people to use only the bathroom that matches the gender on their birth certificate. It also drew fire for provisions that restrict an individual’s power to sue for discrimination in state court and block local gay rights protections.

Many Republicans here felt that HB2 would energize evangelical voters who have been skeptical of McCrory, especially after he vetoed a religious-exemption bill a year ago that allowed court magistrates to opt out of administering gay marriages. The overwhelmingly Republican legislature overrode him on that measure.

But, in recent days, McCrory was caught off-guard by the backlash over HB2 from another pillar of the GOP — corporate America. PayPal last week scrapped plans to open an office that would have employed 400 people, citing the unfriendly business climate. On Tuesday, Deutsche Bank said it will no longer create 250 jobs in Cary. Several groups have canceled conventions, and the state may lose next year’s NBA All-Star Game.

Tuesday’s executive order served as an acknowledgment that McCrory is still trying to find the right political balance.

The governor does not want evangelicals to think he caved to pressure from big business, but he also wants to convince his friends in the country-club wing of the party that he understands the law overreached.

A transgender woman gathers likeminded North Carolinians in Charlotte to protest the state's controversial new law that restricts transgender people from using the bathroom that corresponds with their chosen gender. (Whitney Shefte/The Washington Post)

“In a presidential year, you have to run a base campaign and run a campaign based on appealing to the middle,” said Chris LaCivita, McCrory’s chief political strategist. “To fold up the tent and ignore a portion of the electorate — moderates in the suburbs — is ceding defeat.”

Both sides agree that, considering this year’s unpredictable dynamic, North Carolina is effectively a 50-50 state.

Barack Obama won here in 2008. He lost the state to Mitt Romney in 2012. But surveys show Democratic presidential front-runner Hillary Clinton either tied with or narrowly ahead of Trump and Cruz.

Polls show that McCrory is embroiled in a neck-and-neck race against his challenger, Democratic Attorney General Roy Cooper.

Criticism has grown inside the state as well. University of North Carolina system President Margaret Spellings, the education secretary under President George W. Bush whose past criticism of same-sex relationships became a controversy when her UNC appointment was announced, warned that the law could endanger her system’s federal funding, hurt alumni giving and make recruiting the best talent harder. Bruce Springsteen canceled a Greensboro show last week.

Prior to Tuesday’s announcement, McCrory allies had become increasingly alarmed that the legislation would make it harder to tout a declining unemployment rate and other good economic news.

“The governor can [now] say he took action to fix it,” LaCivita said. “But he’s not budging on the core issue — bathrooms.”

McCrory, 59, was mayor of Charlotte for 14 years before getting elected governor. Perceived as a centrist, he got 48,000 more votes out of Mecklenburg County, the most populous in the state and home to Charlotte, than Romney. Obama won the county by 22 points. McCrory won it by one point.

Democrats say the HB2 fight ensures McCrory will not be able to count on those numbers again.

Cooper has seized on the law, using it to activate his liberal base, to woo moderates and to raise money from the deep-pocketed LGBT community.

Cooper has refused to defend the measure in court, where it faces challenges from the American Civil Liberties Union and other liberal groups.

“It was an easy choice for me,” Cooper said over breakfast at the Flying Biscuit.

Cooper, 58, has taken on banks, utilities and pharmaceutical companies during his 15 years as attorney general. In the wake of HB2, he’s positioning himself as more friendly to business than McCrory, who was once an executive at Duke Energy.

“I believe that North Carolina should help businesses when they need help and stay out of the way when they don’t,” Cooper said.

It is ironic that McCrory has become the face of HB2. In many respects, he was dragged to the center of the controversy by the state’s conservative, GOP-led legislature, which was swept into power in 2010 and has engineered a major shift to the right in a state with a long tradition of centrist politics.

McCrory was reluctant to hold a special session to invalidate the Charlotte ordinance. After he declined to call for one, legislative leaders used a parliamentary tactic to call themselves back into session.

Then, the legislature went further than his staff anticipated. Intended to be a “bathroom bill,” it wound up — among other things — preventing cities from setting a minimum wage higher than $7.25 an hour.

Instead of trying to negotiate to water down the bill, McCrory signed it hours after it passed. He knew the legislature would probably override his veto anyway — as it did with the religious-exemption bill last year. Another veto would have angered the grass-roots activists who he needs ginned up for the fall while also making him look weak.

Dallas Woodhouse, executive director of the North Carolina Republican Party, argued that the bathroom bill — if properly framed — will help McCrory with suburban women, not just rural voters.

“Any time you deal with this stuff, you sometimes have some cleanup work,” Woodhouse said of the proposed changes. “I personally think the politics will work in our favor. . . . Moms want to be able to send their 11-year-old daughters into the bathroom and not worry about grown men being in there.”