A federal appeals court in Washington has declared unconstitutional President Barack Obama’s recess appointments to a labor board in a sweeping decision that curtailed executive power and undermined the legitimacy of a high-profile, controversial appointment to the administration’s consumer financial protection agency.

The unanimous decision of a three-judge panel of the U.S. Court of Appeals for the D.C. Circuit set up a potential showdown in the U.S. Supreme Court over the scope of the power of the president to fill vacancies through recess appointments. The court’s ruling marked a significant blow for the U.S. Justice Department, which had defended the recess appointments to the National Labor Relations Board as a valid, historical exercise of presidential authority.