President Obama’s attempt to make appointments to the National Labor Relations Board while the Senate was still technically in session was unconstitutional, the Supreme Court ruled Thursday.

The decision, which was unanimous in judgment, preserves the recess appointment power much as it was prior to Obama’s confrontation with Congress three years ago.

“We hold that, for pur­poses of the Recess Appointments Clause, the Senate is in session when it says it is, provided that, under its own rules, it retains the capacity to transact Senate business,” wrote Justice Stephen Breyer. “The Senate met that standard here.”

The fight goes back to 2011, when Republicans were seeking to prevent appointments to the National Labor Relations Board and the Consumer Financial Protection Bureau, in an attempt to prevent both from functioning properly. The NLRB adjudicates labor disputes, and the CPFB was set up in the aftermath of the 2008 economic crisis to regulate the financial institutions that helped contribute to the meltdown. Republicans weren’t just opposing particular appointments – they wanted to block the very functions the agencies were created to perform.

Close video Pivotal, unanimous rulings at Supreme Court The U.S. Supreme Court severely limited the president’s authority to make recess appointments, but doesn’t go all the way. Another ruling limits the power of states to restrict protesters outside abortion clinics. NBC’s Pete Williams reports. share tweet email Embed

With the Supreme Court’s decision, presidents will still be allowed to make recess appointments during recesses between or during sessions of Congress. The majority opinion sets a floor for what constitutes a recess, stating that three days would be too short a time to count for the purposes of the recess appointment power. Appointments of the type Obama made, at a time when Republicans were using procedural gimmicks to keep Congress technically in session, would be prohibited.

Presidents of both parties have used recess appointments to circumvent Congress when lawmakers have refused to confirm their nominees. Since the beginning of the dispute over Obama’s recess appointments however, Republicans – including officials who were themselves recess appointed – have embraced an archaic conception of recess appointments held before Americans had running water or electricity.

Republicans were using a procedural gimmick called “pro forma” sessions – one used by Democrats in the past – to technically keep the Senate in session over the winter break while most lawmakers were at home. During one such pro-forma session, Obama made a set of recess appointments although the Senate was not technically in recess. When the NLRB ruled against the Noel Canning company in a labor dispute, they challenged the decision saying Obama’s appointees were not constitutionally appointed.

Not a single Justice on the high court agreed with the Obama administration’s interpretation of the recess appointment power. Had Democrats been willing to abolish the filibuster earlier, they might have avoided the conflict entirely. Since then, Senate confirmed appointments have been made to both the National Labor Relations Board and the Consumer Financial Protection Bureau.

It’s unclear where the high court’s ruling leaves decisions made by the NLRB while its members were recess appointed. Richard Cordray, the recess appointed director of the CFPB, was later confirmed by the Senate. He then ratified past decisions made prior to his confirmation.

“It’s possible that the NLRB members could go back and ratify the decisions that were made when they were recess appointed, but it’s unclear if that would hold up in court. So that is something that would be litigated going forward,” said Brianne Gorod, appellate counsel with the Constitutional Accountability Center. ”The CFPB is in a slightly different position. Richard Cordray ratified all of his decisions after he was confirmed, and so I believe there’s no legal problem with those decisions at this point.”

The then-conservative dominated D.C. Circuit Court of Appeals not only sided with Noel Canning, they ruled that all recess appointments were unconstitutional, except those made during the same recess where the vacancy occurs. That position would have made the vast majority of recess appointments made in history unconstitutional.

A majority of the court declined to take that view, with Chief Justice John Roberts, and Justices Samuel Alito and Clarence Thomas siding with Antonin Scalia, in his concurrence siding with the D.C. Circuit.