President Trump and special counsel Robert S. Mueller III. (Jabin Botsford/The Washington Post; Win McNamee/Getty Images)

Special counsel Robert S. Mueller III’s team defended the validity of his appointment in court Thursday amid uncertainty about the future of his investigation into Russian interference in the 2016 presidential election.

Mueller’s attorneys were responding to a challenge brought by an associate of Roger Stone, a longtime adviser to President Trump, that questions the constitutionality of Mueller’s role — and that could eventually reach the Supreme Court.

The hearing, coming a day after Trump ousted Jeff Sessions as attorney general, opened with a judge at the U.S. Court of Appeals for the D.C. Circuit telling lawyers to make their cases as if it were being argued Wednesday morning, before the Justice Department shake-up.

Andrew Miller, a former assistant to Stone, appealed after losing his bid to block a grand-jury subpoena from Mueller. Miller was held in contempt, but that ruling is on hold pending the outcome of his appeals case.

The special counsel’s team has sought to interview a number of Stone associates or have them appear before the grand jury as part of the 18-month-old probe.

Government attorney Michael Dreeben provided insight Thursday into how Mueller’s team has been operating under the supervision of Deputy Attorney General Rod J. Rosenstein.

There is day-to-day independence, but the team has to report major developments, he said. Rosenstein can ask for explanations of prosecutorial decisions, and the team needs approval to grant immunity to witnesses, for instance, or to subpoena a member of the media.

“He’s aware of what we’re doing,” Dreeben said in court. “It is not the case that the special counsel’s office is off wandering in a free-floating environment.”

Miller’s attorney disagreed. He said Mueller was named unlawfully, in violation of the appointments clause of the Constitution. The attorney, Paul Kamenar, also argued that Mueller has broad prosecutorial powers and little oversight.

Mueller “lacks significant direction and supervision” and is akin to a U.S. attorney-at-large, Kamenar said.

Miller’s appeal is backed by the National Legal and Policy Center, a conservative nonprofit group, and was shaped in part by arguments advanced by law professor Steven G. Calabresi, co-founder of the Federalist Society.

Two district court judges in Washington — one nominated by a Democrat, the other by Trump — have upheld the constitutionality of Mueller’s appointment in recent rulings. The hearing Thursday, however, was the first time an appeals court panel — made up of Judges Karen LeCraft Henderson, Judith W. Rogers and Sri Srinivasan — reviewed the special counsel’s authority.

Rosenstein appointed Mueller in May 2017, after Trump fired FBI Director James B. Comey. Rosenstein’s involvement came because Sessions had recused himself from matters involving the campaign.

The president this week claimed he has the power to immediately cut short the special counsel’s investigation but said he wants to “let it go on.”

“I could fire everybody right now,” Trump said at a post-election news conference Wednesday, shortly before Sessions resigned at the president’s request and was replaced on an acting basis with Matthew G. Whitaker. Whitaker will assume aut hority over the special-counsel probe, a Justice Department official said, and does not intend to recuse himself from overseeing the investigation, according to people close to him.

A Russian firm, Concord Management and Consulting, made an argument similar to Miller’s on Thursday in an effort to have an indictment of the company issued by the special counsel dismissed.

Concord was charged along with 13 Russian nationals and two other companies, accused of orchestrating a social media influence campaign to affect the 2016 election. Concord has pleaded not guilty.

The three-judge panel must answer the specific question of whether Mueller is a “principal officer,” requiring appointment by the president and Senate confirmation, or an “inferior” one, who can be appointed by the head of a department.

Two appeals judges — Srinivasan and Rogers — seemed skeptical of the argument from Concord’s attorney that Mueller’s appointment by the Department of Justice required a specific statute passed by Congress.

“DOJ hires private attorneys all the time,” Rogers said.

Srinivasan noted his own appointment as a former deputy solicitor general was not specified in law or approved by the Senate. “Does your position mean the appointment was invalid?” he asked.

If the appeals court rules against him, Miller intends to ask to the Supreme Court for review, his attorney, Kamenar, said after court Thursday.

The appointments clause generally requires officers to be nominated by the president and confirmed by the Senate, but it allows for officials deemed “inferior” to be appointed by the heads of departments, the president or a court if they are supervised by a principal officer. If Mueller is a “principal” officer, his appointment is invalid because he was tapped by Rosenstein.

In a July ruling in Miller’s case, Chief U.S. District Judge Beryl A. Howell wrote that the “scope of the Special Counsel’s power falls well within the boundaries the Constitution permits,” in part because he is supervised by an official, in this case Rosenstein, “who is himself accountable to the elected President.”

Miller worked for Stone, a longtime friend of Trump, during the 2016 presidential campaign, handling duties such as setting up media interviews. He is one of at least nine of Stone’s associates contacted by prosecutors.After Howell’s ruling, an opinion in August from U.S. District Judge Dabney L. Friedrich, a Trump appointee, also upheld Mueller’s appointment . Friedrich rejected a separate challenge from Concord, the Russian company

Stone has repeatedly said he was not in touch with WikiLeaks, which published Democratic emails that prosecutors allege were hacked by Russian operatives and that were published in the final months of the presidential race.

Rosalind S. Helderman contributed to this report.