RALEIGH, N.C. (AP) — North Carolina judges issued partial victories Friday to both Republican legislators and new Democratic Gov. Roy Cooper over laws designed to undercut his powers.

The judicial panel threw out laws approved two weeks before Cooper took office that limit his authority in carrying out elections and that give civil service job protections to hundreds of former Republican Gov. Pat McCrory’s political appointees.

But a majority of the three judges also upheld the new law subjecting Cooper’s Cabinet secretaries to formal confirmation by a majority of the state Senate. The judges already had declined earlier to halt confirmation activity by Senate Republicans, and three department heads have been approved unanimously since last week.

The rulings by the panel of trial court judges, which followed oral arguments last week, could be appealed.

The litigation exemplifies the power struggle between Cooper — who narrowly defeated McCrory after a campaign blasting the GOP agenda for the past four years — and the legislature, where Republicans hold veto-proof majorities. Legislative leaders already have sued over Cooper’s attempts to expand Medicaid and are advancing bills that would remove his ability to fill judicial vacancies.

Attorneys for Republican House Speaker Tim Moore and Senate leader Phil Berger argued that the state Constitution gave the General Assembly prominence over the governor and the courts. They said judges should not get involved in the political dogfight flowing from Cooper’s November election and the legislature’s actions in December.

But Cooper’s attorneys said the laws should be invalidated because they skew the balance of power and make it difficult for a governor to carry out his duty to execute the state’s laws.

“We’re pleased the trial court ruled two of these three laws unconstitutional, and we believe strongly that the Supreme Court ultimately will agree with us on all three,” Cooper spokeswoman Noelle Talley said in a release.

Berger’s spokeswoman, Shelly Carver, said it was “encouraging the court recognized the plain language in our state’s Constitution providing for a transparent confirmation process for unelected cabinet secretaries” with great responsibilities. She said further review would occur before deciding to continue the court fight or make changes through legislation.

For decades, the governor chose all members of the State Board of Elections. Under the challenged law, the board would be combined with the current State Ethics Commission, and the governor and legislative leaders would each have four picks for the new panel.

The three judges ruled unanimously that the change in board makeup would prevent the governor from performing his constitutional and executive branch duties.

“The governor will have inadequate control over the new state board,” the judges wrote.

In separate 2-1 decisions, the panel let stand the confirmation law and threw out a provision related to a decision by the General Assembly to lower a cap on the number of political appointees for the governor from 1,500 during McCrory’s administration to 425 for Cooper.

Republicans said the state Constitution gives the Senate “advice and consent” powers for the governor’s nominations. Cooper’s lawyers have said that power only applied to constitutional officers, not his 10 department heads.

But the judges wrote the Constitution does not prohibit a law establishing such a mandate and “advice and consent” fails to erode the separation of powers between the legislative and executive branches.

The lower number of policymaking positions for Cooper across state government meant several hundred employees loyal to McCrory could stay in the new administration with job protections like most rank-and-file state workers. The ruling said the law allowing McCrory’s former workers to convert to career employees crosses the line by limiting Cooper’s ability to remove them.

With the law, “the General Assembly has effectively appointed hundreds of employees in the heart of the executive branch,” the ruling said, leaving Cooper with little control over the views and priorities of key policymakers.

__

Associated Press writer Emery P. Dalesio contributed to this report.