WASHINGTON — The Supreme Court on Thursday limited the president’s power to fill high-level administration posts with temporary appointments, ruling in favor of Senate Republicans in their partisan clash with President Obama.

It was the high court’s first case involving the Constitution’s recess appointments clause, ending with a unanimous decision that Obama’s appointments to the National Labor Relations Board in 2012 without Senate confirmation were illegal.

But the justices stopped short of a more sweeping decision that would have effectively ended a president’s power to make recess appointments when the Senate takes a break.

Obama had argued that the Senate was on an extended holiday break and that the brief sessions it held every three days – what lawmakers call “pro forma” – were a sham intended to prevent him from filling seats on the NLRB.

Rejecting that argument, Justice Stephen Breyer said in his majority opinion that the Senate is not in recess if lawmakers actually say they are in session and retain the power to conduct business. He said a congressional break has to last at least 10 days to be considered a recess under the Constitution.

The impact of the decision may be less important since Senate Democrats changed the rules to make it harder for the chamber’s minority party – currently the GOP – to block Obama’s nominations.

White House spokesman Josh Earnest said the administration disagreed with the court’s ruling, but “we’ll honor it.”

The outcome was the least significant loss possible for the administration. The lower court had gone further, ruling that the only recess recognized by the Constitution is the once-a-year break between sessions of Congress. It also said that only vacancies that arise during that recess could be filled.

Justice Antonin Scalia, writing for himself, Chief Justice John Roberts and Justices Samuel Alito and Clarence Thomas, said he would have upheld the reasoning of the U.S. Court of Appeals for the D.C. Circuit. “The only remaining practical use for the recess-appointment power is the ignoble one of enabling presidents to circumvent the Senate’s role in the appointment process, which is precisely what happened here,” said Scalia.