RALEIGH — A half-dozen state boards and commissions are unconstitutional because the governor lacks sufficient control over their membership, a judicial panel ruled Friday.

The unanimous order by the three trial court judges invalidates these regulatory, licensing and funding distribution boards until the General Assembly retools them with new legislation, or if a higher court blocks enforcement of the order if there’s an appeal. Some of the panels regulate child care, hand out clean-water grants and license private investigators.

The ruling marks the latest outcome in a legal power struggle between Democratic Gov. Roy Cooper and the Republican-controlled legislature, although the issue dates back to another lawsuit involving the previous governor, Republican Pat McCrory.

The state Supreme Court’s majority opinions in 2016 in the McCrory lawsuit and last January in another portion of Cooper’s lawsuit helped describe how and when a board impinges upon the governor’s authority to faithfully execute laws.