For the first time in its history, the US Supreme Court on Thursday defined the scope and purpose of the president’s constitutional power to make recess appointments and set the terms for that authority to guide future generations of American leaders.

The decision settles a long-running debate as old as the nation about when and under what conditions the president is free to act alone in filling vacancies.

In its opinion on Thursday, the high court handed down two decisions.

First, by a 9-to-0 vote, the justices ruled that President Obama overstepped his authority when he unilaterally declared that the Senate was in recess and appointed three new members to the National Labor Relations Board in January 2012.

Second, in a 5-to-4 decision, the court embraced a broad reading of a president’s power to make recess appointments, although not as broad as Mr. Obama had claimed.

The second decision is a landmark.

It establishes that a president may make recess appointments during any recess in the Senate, whether arising during an inter-session break (between formal sessions of Congress) or an intra-session break (like a summer vacation).

In addition, the majority justices ruled that the president could use the recess appointment power to fill vacancies that arise both before and during any recess. And the court declared that a Senate recess of three to 10 days would be too short to justify a presidential recess appointment.

The crux of the 5-to-4 split between the majority decision and the objecting justices is over how closely to adhere to the text of the Recess Appointments Clause.

The four objecting justices insist that strict attention to the wording of the clause requires a narrow result.

In contrast, the majority embraced a broad reading and took into consideration the fact that lawmakers and presidents throughout US history have adopted a wide range of positions on the scope of the clause.

“We believe that the Clause’s text, standing alone, is ambiguous,” Justice Stephen Breyer wrote for the court.

“It does not resolve whether the President may make appointments during intra-session recesses, or whether he may fill pre-recess vacancies.”

Justice Breyer added: “But the broader reading better serves the Clause’s structural function.”

It is also “reinforced by centuries of history, which we are hesitant to disturb,” Breyer wrote.

It is that ambiguous wording in the Recess Appointments Clause that has caused Senate Republicans at times to stake out an obstructionist posture against a Democratic president’s attempted use of the recess appointment power and caused Senate Democrats to stake out the same posture against a Republican president seeking to make a recess appointment.

Writing in opposition, Justice Antonin Scalia accused the majority of advancing an “adverse-possession” theory of executive authority.

Since presidents have long claimed broad recess appointment powers and the Senate has not always vigorously disputed those claims, the court will not disturb existing compromises and working arrangements, he said.

But such a broad reading does not come without consequences, Justice Scalia warned. “The Court’s decision transforms the recess-appointment power from a tool carefully designed to fill a narrow and specific need into a weapon to be wielded by future Presidents against future Senates,” he said.

Scalia was joined by Chief Justice John Roberts, and Justices Clarence Thomas and Samuel Alito.

The Constitution provides that the president has the power to nominate ambassadors, judges, and other top government officials, but that the nomination cannot be approved without the “advice and consent” of the Senate. This is part of the checks and balances designed by the nation’s Founders.

But there is a contingency.

Since the Senate may not always be available to give its advice and consent, the Constitution also provides that the president “shall have the power to fill up all vacancies that may happen during the recess of the Senate.”

The question posed in the case was what precisely does the clause permit a president to do and did Obama comply with the requirements of the clause in January 2012 when he appointed three members to the NLRB?

That action came a day after the Senate conducted a pro-forma session formally opening the 112th Congress.

Only one senator presided over the pro-forma session, but such maneuvers have traditionally meant that the Senate is in session, even though no business is conducted.

The president and his lawyers insisted during oral argument that appointments under the recess appointment clause are possible during such pro-forma sessions because the Senate is, in fact, unavailable to consult on nominations to unfilled executive branch posts.

In the unanimous portion of its decision, the high court ruled that pro forma sessions are not recesses and that it is not within the president’s power to decide otherwise.

“We hold that, for purposes of the Recess Appointments Clause, the Senate is in session when it says it is,” Breyer wrote.

The underlying case stems from a labor dispute between the management of Noel Canning, a Yakima, Wash., bottling and soft drink distribution company, and Teamsters Local 760.

The dispute went to the NLRB, which ruled in favor of the Teamsters.

In appealing that ruling, lawyers for Noel Canning said the NLRB decision against the company was void because two of the NLRB panel members had been placed on the board through unconstitutional recess appointments in January 2012 by President Obama. The NLRB thus lacked a quorum necessary to conduct business, they said.

A federal appeals court in Washington, D.C., agreed with the lawyers, ruling that the Senate was not in recess at the time Obama made the appointments. The appeals court said the recess appointment power could only be used during the formal recess between one enumerated session of Congress and the beginning of another.

In addition, the appeals court further restricted the recess appointment power by ruling that the president could only make recess appointments to fill vacancies that arose during a genuine recess of Congress.

In its decision on Thursday, the high court rejected the appeals court’s narrow reading of the text of the Recess Appointments Clause, but it agreed with the appeals court that Obama exceeded his authority in using his recess appointment power.

Justice Scalia agreed with the appeals court’s narrow, text-based interpretation.

“The majority replaces the Constitution’s text with a new set of judge-made rules to govern recess appointments,” he wrote. “Henceforth, the Senate can avoid triggering the President’s now-vast recess-appointment power by the odd contrivance of never adjourning for more than three days without holding a pro forma session.”

Scalia added: “The real tragedy of today’s decision is not simply the abolition of the Constitution’s limits on the recess-appointment power and the substitution of a novel framework invented by the Court. It is the damage done to our separation-of-powers jurisprudence more generally.”

In the majority opinion, Breyer said Scalia’s approach “would render illegitimate thousands of recess appointments reaching all the way back to the founding era.”

Breyer rejected the charge that the majority had embraced an “adverse-possession theory of executive power.”

“Instead, as in all cases, we interpret the Constitution in light of its text, purposes, and our whole experience as a Nation,” he said. “And we look to the actual practice of Government to inform our interpretation.”

The case was NLRB v. Noel Canning (12-1281).