The Supreme Court on Thursday ruled unanimously that President Obama overstepped his constitutional authority to make government appointments while the Senate was in recess, saying the upper chamber was in session when the president put members on the National Labor Relations Board in 2012.

The high-profile decision is a major setback for the Obama administration, which said the appointments were necessary to overcome congressional gridlock — and followed the precedent set by Obama's predecessors.

"We’re of course deeply disappointed in today’s decision," White House press secretary Josh Earnest told reporters.

"We are, however, pleased that the court recognized the president’s executive authority as exercised by presidents going all the way back to George Washington," he added.

The three NLRB appointments in question are now invalid.

The president has broad legal authority to make recess appointments, but since the upper chamber held pro forma sessions every three days, Senate Republicans argued they were in session. The nation's highest court agreed with the GOP reasoning.

"The Recess Appointments Clause empowers the president to fill any existing vacancy during any recess — intra-session or inter-session — of sufficient length," the court wrote in its decision.

"A Senate recess that is so short that it does not require the consent of the House under that clause is not long enough to trigger the president's recess-appointment power," it added.

Though the clash is just part of chronic debate between Obama and Republicans over his executive authority, the court's decision will have a long-lasting impact on when future presidents can make their preferred appointments.

And GOP leaders quickly hailed the court's ruling.

"This administration has a tendency to abide by laws that it likes and to disregard those it doesn’t. In this case, that disturbing and dangerous tendency extended to the Constitution itself," Senate Minority Leader Mitch McConnell, R-Ky., said. "Whether it’s recess appointments or Obamacare, this troubling approach does serious damage to the rule of law and the court’s decision is a clear rebuke of the administration’s behavior."

"By invalidating these appointments," Speaker John Boehner, R-Ohio, added, "the Supreme Court has reaffirmed that the president cannot ignore the Constitution, and selectively interpret our rules and practices for his political purposes."

The court agreed unanimously that the Senate was in session when Obama made his NLRB selections, but the justices split in their interpretations of the president's recess powers. A majority of the panel said that the Senate must be out of session for at least 10 days for the president to make a recess appointment.

However, Obama's nominating authority was bolstered in recent months when Senate Democrats employed the so-called nuclear option, making it easier for the president's appointments to receive a simple majority vote in the upper chamber.

The president accused Republicans of blocking his ability to fill vacancies at the NLRB because they simply did not agree with the board's decisions. Obama made the contested appointments when the NLRB was down to just two active members.

This article was originally posted at 10:10 a.m. and has since been updated.