RALEIGH, N.C. — Perhaps the outcome was to be expected here in deeply conflicted North Carolina. While voters chose the brash, bullying TV boss of “The Apprentice” for president, they simultaneously chose an earnest, low-key character closer to Andy Griffith as governor.

But nearly three months into his term, the Democratic governor, Roy Cooper, will need more than his gentle, tobacco-country politesse to govern effectively. In basketball terms, Mr. Cooper is going to have to throw some elbows.

So last week, Mr. Cooper served a mix of sugar and threat as he delivered his first State of the State address before the famously aggressive Republican-controlled General Assembly. He presented the speech with a smile — but everyone was aware of the uncomfortable fact that the new governor was suing the legislature over laws it passed that significantly curtail his power.

“I promise to listen, to engage, to build consensus, to compromise when possible,” Mr. Cooper said during his address. “I promise to fight only when we can’t come to agreement — or when you leave me no choice.”

North Carolina has been split by extraordinary partisan strife as Republicans, historically the state’s underdog party, enjoyed four years of undivided government, pursuing an ambitious agenda that Democrats saw as an assault on the environment, public education and minority voting rights.

In response, the left repeatedly filled the halls of the State Capitol complex for protests, calling the movement “Moral Mondays.” Conservatives stewed at the implication that their small-government vision, which they credit with restoring the state’s fiscal health and kick-starting a moribund economy, was somehow immoral.

The challenge Mr. Cooper faces as he seeks to patch up North Carolina may serve as a test of whether the nation’s increasingly belligerent political factions can find anything to agree on. The test is best exemplified by the fact that Mr. Cooper has been unable, thus far, to find a way to undo the Republican-backed law known as House Bill 2, which curbs protections for lesbian, gay, bisexual and transgender people. It also requires transgender people in public buildings to use the bathroom that corresponds with the gender on their birth certificate.

The measure has prompted boycotts, national outrage, and decisions by the National Collegiate Athletic Association, the Atlantic Coast Conference and the National Basketball Association to move prestigious sports events out of state.

Mr. Cooper criticized House Bill 2 during his campaign against Gov. Pat McCrory, the Republican incumbent, who had signed the bill into law, and he continues to do so. In his speech last week, he referred to the law as “the dark cloud hanging over our state of promise,” and called for its repeal.

Many Democrats rose to applaud. Few Republicans did.

A lawyer and lifelong Democrat, Mr. Cooper could fit a Hollywood casting director’s vision of a Southern governor from either party. He is 59 years old and trim, with a full head of graying hair and a subtle drawl that betrays his roots in rural Nash County.

For years, he served as a state representative, then Senate majority leader, earning a reputation as a competent centrist and heir to the state’s moderate Democrat tradition.

He then spent 16 years as state attorney general, taking a turn in the national spotlight with his independent review of the racially charged and badly botched sexual assault cases that a local prosecutor had brought against three white former members of the Duke University men’s lacrosse team. Mr. Cooper declared the men innocent in April 2007. He also declined to bring criminal charges against their African-American accuser despite what he called her “faulty” accusations, a move that, like others in Mr. Cooper’s career, could be viewed as overly cautious, politically savvy or both.

During last year’s campaign, Mr. Cooper positioned himself as an even-keeled leader who would tamp down the drama in Raleigh. He won by nearly 10,000 votes, even as Donald J. Trump beat Hillary Clinton by more than 175,000 votes statewide in the presidential contest.

Republicans then spent nearly a month challenging the results. Before Mr. Cooper’s swearing-in, legislators passed the contentious laws that weakened Mr. Cooper by loosening the governor’s control over the state elections board, granting Civil Service protection to hundreds of Mr. McCrory’s political appointees and giving the Senate the ability to approve or reject the governor’s agency heads.

On Friday, a three-judge state panel issued a mixed opinion, siding with Mr. Cooper over the elections board and the Civil Service jobs, but ruling that the Senate does have the power to approve his cabinet appointees.

Even some Republicans took Mr. Cooper’s suit challenging the laws as a sign that he would not be bullied.

“Roy’s an easygoing, soft-spoken guy in person, and would generally avoid a fight if it were possible,” said Carter Wrenn, a veteran strategist who worked on the Senate campaigns of Jesse Helms. “And so I was a little surprised how aggressive he’s been in responding. I guess he had no choice.”

Mr. Cooper has rejected, for now, new legislation that would repeal House Bill 2, including a contentious provision that prohibits local governments from passing nondiscrimination ordinances.

But it would allow the local nondiscrimination ordinances to be subject to a referendum, which Mr. Cooper argued would be “like putting the Civil Rights Act to a popular vote in cities in the South during the 1960s.”

In other ways, North Carolinians are getting a sense of what life might look like under a divided government in which Republicans enjoy veto-proof legislative majorities. Mr. Cooper’s proposed budget, unveiled this month, does not call for tax increases. John Hood, a conservative commentator, has called that “a crushing defeat” for liberals who spent years “attacking Republicans and conservatives for cutting state taxes too much.”

Mr. Hood said in an interview that he was concerned that Mr. Cooper, by appointing department heads, would be able to increase regulations that Republicans have pared back.

In another significant change, Mr. Cooper and the new attorney general, Josh Stein, a Democrat, announced that they would withdraw the state’s request for the United States Supreme Court to review a lower court’s rejection of a Republican-backed law that limited access to the polls. An appeals court found that the law sought to “target African-Americans with almost surgical precision.” On Thursday, Mr. Cooper issued his first veto, of a bill that would make some judicial elections partisan.

In his speech last week, Mr. Cooper eschewed such sensitive topics and instead focused on places where he thought the two sides might agree, such as raises for public-school teachers.

The official response from Republicans was delivered by the Senate president pro tempore, Phil Berger, and it was blistering.

“They call their neighbors who vote conservatives into office stupid, uninformed, dupes and deplorables,” Mr. Berger said of liberals. “Tonight we heard the left’s new champion. Roy Cooper is pushing their vision for the future of North Carolina, except it’s not a vision for the future of North Carolina at all. It’s a mirage. It’s merely a retreat to our troubled past.”

The next day, Mr. Cooper traveled to Wilmington, where he made his case to the local Chamber of Commerce. The reception was polite, but far from ecstatic — especially when he called for repealing House Bill 2, an idea that garnered only light applause.

Deb Hause, a marketing coordinator, said House Bill 2 made some sense to her. “I have daughters,” Ms. Hause said, and she worried about changing traditional restroom norms.

She said she had met Mr. Cooper numerous times and found him to be exceedingly pleasant.

“But he’s got a rough road ahead,” she added. “Let’s be honest.”