WASHINGTON — A lawyer from special counsel Robert Mueller's office argued in court Thursday that Mueller isn't free to do whatever he wants — he must report on major developments, and if he's poised to do something not allowed under Justice Department policies, the official overseeing him can stop him.

Insisting on the limits of Mueller's power is at the heart of his defense against the latest legal challenge to his appointment as special counsel. Andrew Miller, a former associate of Donald Trump ally Roger Stone who was found in contempt of court after he refused to comply with a grand jury subpoena, is arguing the subpoena was invalid because Mueller's appointment was unlawful. Deputy Attorney General Rod Rosenstein appointed Mueller to the position last May to investigate Russian interference in the 2016 election, and any potential ties to Trump's presidential campaign.

One of Miller's main arguments is that Mueller has virtually unchecked power, making him the type of "principal" government official who should be appointed by the president and confirmed by the Senate. That prompted Justice Department lawyer Michael Dreeben to stress the restrictions on Mueller's authority, arguing at a court hearing on Thursday that Mueller is bound by Justice Department rules requiring "urgent reports" on major events in investigations, and also that the official overseeing his office — until recently, Rosenstein — can step in if Mueller is going to do something "inappropriate or unwarranted."

Mueller isn't "off wandering in some free-floating environment," Dreeben said.

It's not clear if Miller's case will be complicated by the change in power at the Justice Department this week. Former attorney general Jeff Sessions, who was forced out of office by Trump on Wednesday, recused himself from the Russia investigation, which put Rosenstein in charge. Trump's appointee as acting attorney general, Matthew Whitaker, will take on oversight of the probe, barring any conflicts or other ethical issues, although some lawyers have questioned whether Whitaker's appointment was constitutional. Democrats have called on him to recuse himself, citing his criticism of the special counsel's appointment and the scope of the investigation.

During arguments in the US Court of Appeals for the DC Circuit on Thursday in Miller's case, Judge Karen LeCraft Henderson told the lawyers to argue as if Sessions hadn't left, however. She said the court would likely ask for additional briefing about the significance of Sessions' departure.

Miller was subpoenaed over the summer to testify before the grand jury. US District Chief Judge Beryl Howell found him in contempt in August when he refused to do so. Miller appealed to the DC Circuit. Howell ordered him jailed until he testifies, but that order has been on hold while he appeals, so he remains free.

Miller's challenge has three parts: First, that Mueller is a "principal" officer of the United States, not an "inferior" officer, which means he had to be appointed by the president and confirmed by the Senate; second, that even if he is an "inferior" officer, only Sessions could have appointed him, notwithstanding his recusal; and third, that Mueller couldn't be appointed at all as special counsel because there was no law explicitly authorizing it.

Federal judges overseeing other cases brought by Mueller's office have rejected previous challenges to Mueller's appointment. In August, for instance, US District Judge Dabney Friedrich, who is handling the special counsel office's case against a Russian troll farm and other Russian individuals and entities accused of trying to interfere with the 2016 election, found that Mueller was an "inferior" officer, and that Rosenstein had authority to appoint Mueller, even in the absence of a specific law.

The three-judge DC Circuit panel that heard arguments Thursday didn't offer many clues about how it would rule, although the judges declined to ask Dreeben any questions about Miller's argument that Sessions, not Rosenstein, was the only person who could appoint a special counsel — that's often a sign judges don't put much weight in a particular argument.

On whether Mueller had enough supervision to be an "inferior" officer, Judge Sri Srinivasan asked about the fact that Justice Department regulations saying a special counsel can only be removed for misconduct or other "good cause" could be changed or withdrawn by the attorney general. Miller's lawyer Paul Kamenar argued that the court should look at the effect of Mueller's actions toward his client and others prosecuted by the special counsel's office now, not what could happen in the future.

"It really doesn't make our life better knowing that we’re being prosecuted, but oh, they can revoke the regulations at some point," Kamenar said. (Miller has not been criminally charged by Mueller's office.)

Judge Judith Rogers said that from the record before the court, it wasn't clear exactly what Rosenstein had done to exercise oversight over Mueller and his office. Kamenar said the language in the Justice Department's special counsel regulations didn't require Mueller to consult with Rosenstein on every decision, and that Mueller could refuse a request for information from Rosenstein and that might not be grounds for firing. That possibility was enough for the court to decide that Mueller is a "principal" officer, Kamenar argued.

The court also heard from James Martin, a lawyer for Concord Management and Consulting, one of the companies charged in Mueller's Russian troll farm case. Concord is participating in the case as an amicus, or "friend of the court," party in support of Miller. Martin argued that Congress hadn't authorized the appointment of an outside private lawyer — Mueller was working at a private law firm when Rosenstein appointed him — as special counsel.

Srinivasan asked if, by Martin's logic, that would mean the appointment of any private lawyer for a Justice Department position would be unlawful unless Congress explicitly authorized it — the judge drew laughs when he raised the hypothetical of a private lawyer appointed to serve as deputy solicitor general, a job he previously held. Martin said there was authority to appoint other DOJ officials, but not for the specific job that Mueller held.

Dreeben argued that the US Supreme Court had repeatedly ruled that the attorney general has authority to appoint special counsels — including in a case stemming from the Watergate scandal — and that federal statutes gave the attorney general power to specially appoint attorneys.

"This is a case where there is more than a volume of history. There are multiple volumes of history," Dreeben said.