A North Carolina court temporarily blocked a new state law on Wednesday that stripped the new Democratic governor of some of his powers.

The law, passed by the GOP-controlled legislature, required Senate confirmation for the governor's Cabinet members, which previous governors have not needed. The law was approved in December, two weeks before Roy Cooper took over. It was criticized by Democrats who called it a partisan effort to undermine the new governor's authority.

A three-judge panel released its decision Wednesday as state senators were scheduled to question Cooper's pick to lead the veterans' affairs department.

Cooper appointed eight of his 10 Cabinet members before the legislature came into session in January and they were sworn in. Cooper said they are the Cabinet heads and are working at their jobs.

The legislature called them acting heads and said that under the law they passed, they can be dismissed if the Senate does not confirm them.

Legislative leaders lashed out at the three judges, calling their decision "a blatant overstep of their constitutional authority."

House Speaker Tim Moore and Senate leader Phil Berger said in a joint statement the "judges are not legislators, and if these three men want to make laws, they should hang up their robes and run for a legislative seat."

Cooper praised the ruling and said the court "should not be intimidated by threats from legislative leaders."

"We need to put these partisan confirmation games behind us" and pass other legislation, Cooper said, including the repeal of a law limiting LGBT rights and which public bathrooms transgender people can use, known as House Bill 2.

The Republican leaders say the public has the right to see a governor's Cabinet face questions in an open forum. Senators have laid out a schedule to examine Cooper's eight picks through mid-March. They said they weren't aiming to be confrontational and wanted to determine if Cooper's choices were capable of performing the job, lacked conflicts of interest and planned to follow the law.

Republican lawmakers say the state Constitution gives the senators "advice and consent" powers over gubernatorial appointments. Cooper, the state's former attorney general, said the law was unconstitutional and sued the legislative leaders.

The law will remain blocked until the court can have another hearing Friday.