The Justice Department’s powerful Office of Legal Counsel went to bat for acting Attorney General Matt Whitaker on Wednesday morning, issuing an memo that declares his appointment didn’t break the law and implies the president has vast power to name new cabinet secretaries with little congressional oversight.

The memo says that before Jeff Sessions left the Justice Department, White House lawyers asked DOJ lawyers about their legal options if the attorney general’s position became vacant.

“This Office had previously advised that the President could designate a senior Department of Justice official, such as Mr. Whitaker, as Acting Attorney General,” the memo reads.

A senior Justice Department official who briefed reporters on the memo said DOJ lawyers told the White House a sufficiently senior Department official who received high enough pay would be eligible to take over as attorney general. The official declined to share more detail about the nature of the White House’s communications with the Department.

The memo’s message is that a sitting president has broad authority to replace departed cabinet secretaries with very little say from Congress.

“What is most troubling about the OLC opinion is that, in effect, it’s a claim that the president can appoint any minor official who satisfied the very modest 90-day requirement of the statute to any cabinet position, and that’s a really extreme reading of executive authority,” said Paul Rosenzweig, a conservative attorney who served in the Department of Homeland Security during the George W. Bush administration.

“It can’t be the case that the Constitution and its framers, having just fought a war to end kingly tyranny, enabled a king,” he added. “If you step back just a hair and look at the policy and the principles involved, it strikes me that the OLC opinion can’t be right.”

The OLC is simultaneously one of the most secretive and most powerful arms of the Justice Department. Its battalion of attorneys assess thorny legal issues and issues memos that govern government agencies. And most of the time, those decisions are secret.

In this case, though, OLC is going public with its memo determining that the Trump administration had the power to install Whitaker—the former chief of staff for Sessions—as acting AG. Whitaker’s appointment instantly drew criticism because of a host of comments he made as a TV pundit lambasting Special Counsel Robert Mueller.

Before being made the head of the Justice Department, Whitaker did not occupy a Senate-confirmed position. As a result, a host of legal experts, including former Solicitor General Neal Katyal, argued his appointment violated the Senate’s Constitutional right to provide advice and consent to the executive branch. Over the weekend, Democratic Senators huddled and discussed whether to sue over the appointment.

Then the state of Maryland jumped in, filing suit earlier this week claiming Whitaker’s appointment broke the law.

The OLC opinion addresses some of those arguments, reviewing historical examples of non-senate-confirmed officials taking jobs that generally require Senate confirmation.