The N.C. Supreme Court Friday closed one chapter in a two-year legal battle between Gov. Roy Cooper and the Republican-led General Assembly. The legislature prevailed.

In Cooper v. Berger, the justices ruled the state Senate does have the authority to confirm the governor’s Cabinet appointments. The opinion, by Chief Justice Mark Martin, says the Senate’s ability to reject an appointment doesn’t violate separation of powers, since the governor chooses who will serve on the Cabinet, supervises those officers, and can remove them at will.

The justices affirmed a decision issued more than a year ago by a unanimous three-judge Court of Appeals panel.

The General Assembly passed legislation in December 2016 requiring the governor to subject appointments for confirmation under “advise and consent” language in the N.C. Constitution. Soon after Cooper took office in early 2017, he filed a lawsuit challenging the law.

A three-judge trial-court panel in March 2017 sided with the General Assembly, saying confirmation doesn’t violate separation of powers. The Court of Appeals several months later agreed, and the justices affirmed the opinion.

Cooper and the General Assembly have faced off several times during his first two years in office over the balance of power in state government.