In this Wednesday, June 25, 2014, file photo, President Barack Obama speaks at the League of Conservation Voters Capitol Dinner at the Ronald Reagan Building in Washington. The Supreme Court on Thursday, June 26, 2014, struck a blow to President Barack Obama's ability to get around political gridlock in Washington by limiting his power to make recess appointments without congressional approval. (AP Photo/Jacquelyn Martin, File)

WASHINGTON (AP) — Before a unanimous Supreme Court weighed in, the White House had brushed off claims that President Barack Obama was exceeding his executive authority as just so much grousing from frustrated partisans.

Then, in a 9-0 decision Thursday, the high court ruled that at least in one case Obama had gone too far.

For Republicans, the court's decision that Obama violated the Constitution in 2012 when he appointed members to the National Labor Relations Board without Senate confirmation validated their argument that Obama has acted against the law when he has taken matters into his own hands.

The court's decision comes while Obama is determined to use all his executive powers to get around the gridlock of a divided Congress. In the process, he has left his imprint on policies ranging from immigration to the environment, from gay rights to worker pay.

"This administration has a tendency to abide by laws that it likes and to disregard those it doesn't," Senate Republican leader Mitch McConnell 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."

Just this week, House Speaker John Boehner accused Obama of "aggressive unilateralism" and announced he would seek a vote in the Republican-controlled House to authorize an election-year lawsuit asserting that Obama has failed to carry out the laws passed by Congress.

The list of grievances against Obama range from his administration's 2011 decision not to argue in favor of the 1996 Defense of Marriage Act before the Supreme Court to his decision to allow certain immigrants who entered the country illegally as children to obtain work permits.

Obama has readily embraced a strategy of acting on his own to pursue certain policies. Faced with Republican opposition to raising the minimum wage, he signed an executive order requiring federal contractors to increase it to $10.10 an hour. He has instructed his administration to prepare an executive order that prevents federal contractors from discriminating against gay, lesbian, bisexual and transgender workers; legislation that would apply to all employees is stuck in the House. And he has put in motion new carbon limits for new power plants.

Moreover, Obama has been under pressure from immigration activists to cut back on deportations of immigrants illegally in the United States. He has ordered a review of administration deportation practices and has indicated he could take executive action to reduce them if the House, as is increasingly likely, does not act on an immigration overhaul this summer.

Boehner's lawsuit threat seemed calculated to coincide with the end of the court's term when two executive power decisions were pending and ahead of any immigration decision by Obama. With the recess appointment ruling now announced, the only remaining one will decide whether the government can force companies to provide insurance that covers certain methods of contraception that the companies say violate their religious beliefs.

"The suit is a stunt," Obama said in an interview with ABC News that aired Friday. "I'm not going to apologize for trying to do something while they're doing nothing."

Even though he ended up on the losing end of the court's decision Thursday, Obama still effectively won what he initially sought. The Democratic-controlled Senate eventually weakened the ability of Republicans to block Obama's nominations by doing away with procedural obstacles that required 60 out of 100 votes to overcome.

As a result, his appointments to the NLRB have since been confirmed, as was his appointment of Richard Cordray as director of the Consumer Finance Protection Bureau, another recess appointment made during the same 2012 Senate break.

"He's no worse off and the presidency is no worse off," said former White House counsel Kathryn Ruemmler, who recently returned to private practice. "In fact, it's better because now future presidents have clarity that the Supreme Court has definitively spoken that intra-session recess appointments are constitutionally valid."

Obama had argued that when he appointed the NLRB members the Senate was on an extended holiday break. The administration maintained that the brief sessions the Senate held every three days were a pretense designed to keep him from making a recess appointment.

In his majority opinion, Justice Stephen Breyer said that the Senate is not in recess if lawmakers actually say they are in session. A congressional break, he said, has to last at least 10 days to be considered a recess under the Constitution.

Conservatives took special notice of the solidarity behind the decision of the nine justices.

"They're surprisingly willing to push back against this president's overreach," said Curt Levey, who heads the conservative Committee for Justice.

Still, the decision was particularly narrow and did not end a president's power to make recess appointments.

Writing separately, the four justices on the conservative side of the court said they would have upheld an appellate court ruling that the only recess recognized by the Constitution is the once-a-year break between sessions of Congress.

"The presidency dodged a bullet today," said John Cooney, a former assistant to the solicitor general and deputy general counsel at the Office of Management and Budget under President Ronald Reagan. "This decision could have been a lot worse."

He said Obama will still leave his successors with more constricted authority to make recess appointments than he had when he came into office. "All his predecessors had been very careful not to risk the powers of the presidency on separation of powers litigation whenever they didn't have high assurances that they'd win," Cooney said.