The Supreme Court ruled against President Donald Trump’s effort to remove Federal Reserve Board member Lisa Cook on Monday, even as the justices expanded presidential power to remove members of the Federal Trade Commission and other independent agencies.

The two decisions written by Chief Justice John G. Roberts Jr — a 5-4 opinion in favor of Cook and a 6-3 opinion allowing Trump to fire FTC commissioner Rebecca Slaughter — reshape the bounds of presidential control over the executive branch of government.

The Cook decision backs a laws Congress meant to protect members of the Federal Reserve from being fired without cause, but the Slaughter decision effectively cancels out those laws for members of independent boards such as the FTC, Federal Election Commission and Federal Communications Commission.

Together, the decisions back broad presidential power to remove almost any official in the executive branch at will but drew a line at the Federal Reserve Board of Governors.

Roberts wrote that Congress had limited the power of presidents to remove Federal Reserve board members “for good reason,” a long tradition of monetary policy independent of executive influence made it different from executive agencies.