The Supreme Court has limited the Donald Trump's power to temporarily fill vacant government posts while nominations are tied up in partisan political fights.
The 6-2 ruling said a former top lawyer at the National Labor Relations Board had served in violation of a federal law governing such appointments.
Writing for the court, Chief Justice John Roberts said that Lafe Solomon was not allowed to serve as acting general counsel of the agency that enforces labour laws while he was at the same time nominated to fill that role permanently.
At issue is a 1998 law aimed at preventing the President from using temporary appointments to bypass the Senate's advice-and-consent role. The Federal Vacancies Reform Act says a person nominated for a post requiring Senate confirmation can't serve in the same position on a temporary basis.
But the law contains an exception if the nominee served for 90 days as a "first assistant" to the person who previously held the office. The Obama administration said the exception also covered Mr Solomon because he had been a director at a different office at the NLRB.
President Barack Obama named Mr Solomon acting general counsel in June 2010 and he held the office until 4 November, 2013. But he never won Senate confirmation because Republicans viewed him as too favourable to labour unions.
Judge Roberts said a close reading of the law's text shows that the exception did not cover Mr Solomon. He rejected the government's argument that a ruling against it would hamstring future presidents and call into question dozens of temporary appointments made over the years.
"This does not mean that the duties of general counsel to the NLRB needed to go unperformed," Mr Roberts said. "The president could have appointed another person to serve as the acting officer in Solomon's place."
Mr Solomon's authority was challenged after an Arizona-based ambulance company was accused of unfair labour practices. The company, SW General, Inc., said the complaint was void because Mr Solomon's tenure was invalid. The US Court of Appeals for the District of Columbia Circuit sided with the company.
Mr Roberts dismissed arguments that historical practice supported the government. Since the law was enacted in 1998, three presidents have nominated 112 people for permanent posts who also were serving as acting officials. There was never any objection from Congress.
Mr Roberts said those 112 nominations "make up less than two percent of the thousands of nomination to positions in executive agencies" that the Senate has considered during that time. He said the Senate either may not have noticed a problem or opted not to reject a candidate just to make a point about the law.
It's the second time in recent years that the presidential appointment process has come under scrutiny by the high court. In 2014, the Supreme Court ruled that Obama's recess appointment of three NLRB members violated the Constitution. That ruling invalidated hundreds of NLRB rulings and forced the agency to reissue those decisions.
Justice Sonia Sotomayor dissented, noting that the Senate never objected over the years while more than 100 people served in an acting capacity pending their nomination for a permanent post. She was joined by Justice Ruth Bader Ginsburg.
Roberts did not explain what the impact of the court's ruling would be on specific decisions made by Solomon or any other official who might have served improperly in an acting role. The appeals court had said it did not expect its decision "to retroactively undermine a host of NLRB decisions."