North Carolina legislators can claim for themselves the right to reject a governor’s choices for top jobs like collecting taxes or registering automobiles, lawyers defending a state law told the state Supreme Court on Tuesday.

The law doesn’t violate the constitutional principle that government powers be separated and balanced because legislators can create or alter state agencies, so they have a right to consent to who runs them, lawyers for the Republican-led General Assembly said.

Democratic Gov. Roy Cooper’s eight top aides were all approved last year, so the high court should dismiss the governor’s argument that the law is unconstitutional and can’t work because it limits how well Cooper can do his job, attorneys for GOP legislators told the justices.

“By all of his nominees being confirmed and being the first choice, you can see that there is a set of circumstances, i.e. the current circumstances, where there is a constitutional balance of power that’s appropriate,” attorney Martin Warf said.

Lower courts have twice determined North Carolina lawmakers have the power to give themselves the last word on confirming a governor’s choices to run agencies that manage veteran’s affairs, business recruiting, environmental quality, health programs and prisons.

Cooper’s lawyers argued those decisions were wrong because the law passed by the legislature within weeks of Cooper beating former GOP Gov. Pat McCrory in 2016 unconstitutionally interferes with the governor’s ability to choose his top deputies.

While the General Assembly does have the power to shape the departments and duties of the state agencies that Cooper oversees, they can’t interfere with how the governor carries out his duties or who he hires to help with that work, Cooper attorney Eric David told the judges.

“The legislature can build the ship. What it can’t do is tell the governor how to steer it,” David said. “That’s why they’ve gone too far.”

Allowing the law to stand would allow lawmakers or even just legislative leaders to argue in the future that they could even appoint the governor’s cabinet secretaries because nothing in the Constitution prevents that, David said. Legislators could use the same logic to pick the law clerks who work for that Supreme Court’s justices, he said.

The law was passed during a 2016 special legislative session that marked the start of Republicans working at nearly every turn to diminish Cooper’s powers. Two constitutional amendments legislators want voters to adopt next month would further swing powers currently held by Cooper toward the legislature. One amendment would change how judicial vacancies are filled and the other would alter how members of the state elections board are chosen.