WASHINGTON — The Supreme Court issued a unanimous rebuke to President Obama on Thursday, saying he had overreached in issuing recess appointments during brief breaks in the Senate’s work.

Mr. Obama violated the Constitution in 2012, the justices said, by appointing officials to the National Labor Relations Board during a break in the Senate’s work when the chamber was convening every three days in short pro forma sessions in which no business was conducted. Those breaks were too short, Justice Stephen G. Breyer wrote in a majority opinion joined by the court’s four other more liberal members.

At the same time, the court largely reinstated an uneasy, centuries-long accommodation between the executive branch and the Senate, in which recess appointments were allowed during more substantial breaks. Justice Breyer said such appointments generally remained permissible so long as they were made during breaks of 10 or more days.

Although there may be few immediate practical consequences of the ruling, given the recent overhaul of the Senate’s filibuster rules, the decision was nonetheless momentous, involving a constitutional adjudication of the balance of power between the president and the Senate.