RALEIGH, N.C. (AP)  North Carolina’s next Democratic governor has seen a deal he helped broker to repeal the state’s law limiting LGBT protections fall apart and had several of his powers stripped away by the state’s Republican-dominated legislature. And he hasn’t even been sworn in yet.

Gov.-elect Roy Cooper has vowed to keep his campaign promises to bend back the rightward course of the state. But with only a 10,000-vote victory over GOP Gov. Pat McCrory and bitter partisan distrust in this deeply divided state, he’s already slipped along the rocky path he must walk to work successfully with the legislature. And Republicans will maintain veto-proof majorities in 2017.

“My future negotiations with them are certainly going to have to be instructed by this,” a somber yet angry Cooper told reporters last week after the deal to repeal the law known nationally as the “bathroom bill” collapsed.

Two December special sessions, one of which saw raucous protests against Republicans and dozens of arrests, have created further strain in a divided state that chose Republicans Donald Trump for president and Richard Burr for U.S. Senate but went with a Democrat for governor.

“There’s a complete lack of trust between the legislative leadership and Cooper at this point in time,” longtime state Democratic consultant Brad Crone said. “That does not bode well for an incoming governor.”

Missing out on ending House Bill 2  which also directed transgender people to use bathrooms in public buildings corresponding to the sex on their birth certificate  prompted finger-pointing between Cooper and legislative leaders. It would have been a major accomplishment to repeal a bill that has been blamed for job losses, canceled concerts and sporting events, and staining North Carolina’s reputation.

“I think Roy Cooper did everything he could to sabotage a reasonable compromise,” said Senate leader Phil Berger, R-Rockingham.

Cooper shot back: “My mom and dad used to tell me that when you sat down and looked somebody in the eye and told them something you should keep your promise, and clearly they have not done so.”

Even before the General Assembly sessions, Cooper already was at a disadvantage.

Cooper is a 30-year veteran of state politics  14 years in the legislature before 16 as attorney general  and claimed victory on election night. But it was another 27 days before McCrory conceded while dozens of ballot protests and a partial recount worked out the results.

Set to take office Jan. 1, Cooper hasn’t yet announced a single Cabinet appointment  something McCrory had done by this time after his 2012 election  and faces new hurdles for his choices. One law the General Assembly approved this month requires his Cabinet choices be confirmed by legislators. The state Constitution gives the Senate the ability to “advise and consent” to the governor’s appointees by a majority vote, but that provision hadn’t been used in at least several decades.

GOP legislators argued they are only rebalancing the powers between the legislative and executive branches, but Democrats and their allies call it a brazen, unlawful power grab.

Another law reduces the number of political appointees Cooper can hire. Republicans had expanded the number of such policymaking jobs for McCrory from 400 to 1,500. That number goes back down to 425 for Cooper.

Cooper previously threatened lawsuits to challenge the efforts to scale back his power. “They will see me in court,” he told The Charlotte Observer last week.

Even as lawmakers held special sessions, the board of North Carolina’s private nonprofit tasked with luring companies to the state  now filled with appointees from McCrory and the legislature  passed a bylaw change that will make it hard for Cooper to put his board choices on quickly.

The bad blood with lawmakers could portend Cooper’s difficulties to follow through on other campaign platform planks, such as accelerating public education funding and shifting tax burdens away from the middle class. He’s also vowed to preserve voting and abortion rights, after Republicans passed laws in 2013 scaling back early in-person voting and extending the abortion waiting period to three days.

But both Cooper and GOP lawmakers have said they could locate areas of agreement.

“I am optimistic that we can strike a good balance with the governor-elect in trying to build a consensus agenda and move our state forward,” said Rep. David Lewis, R-Harnett, chairman of the powerful House Rules Committee. “Relationships have changed between the legislative and the executive branch, but that doesn’t mean …. we can’t work together.”