WASHINGTON — A federal appeals court ruled Tuesday that special counsel Robert Mueller was “properly appointed,” becoming the first higher court to weigh in on the lawfulness of Mueller’s appointment and come out in his favor.

The US Court of Appeals for the DC Circuit rejected arguments challenging Mueller’s appointment raised by former Roger Stone associate Andrew Miller, who had refused to comply with a grand jury subpoena last year. The three-judge panel unanimously upheld a lower court judge’s order finding Miller in civil contempt, a ruling that could put him behind bars if he still refuses to testify.

In an opinion written by Judge Judith Rogers, the court concluded that Mueller was an “inferior officer,” which meant he could be legally appointed by Deputy Attorney General Rod Rosenstein; Rosenstein appointed Mueller to run the Russia investigation in May 2017. Miller had argued that Mueller was a “principal officer” who had to be confirmed by the US Senate.

Rogers wrote that an official in Mueller’s position didn’t hold enough power on his own to qualify as a “principal officer.” The attorney general — or Rosenstein, who was overseeing Mueller’s work until recently in light of former attorney general Jeff Sessions’ recusal from the Russia probe — could withdraw the regulations that gave Mueller what authority he did have, and that dictated the conditions for when Mueller could be removed, the court noted.

“In either event, Special Counsel Mueller effectively serves at the pleasure of an Executive Branch officer who was appointed with the advice and consent of the Senate,” Rogers wrote.

Miller could petition the entire DC Circuit to reconsider his case, or he could petition the US Supreme Court. If Tuesday’s opinion stands, Miller will be jailed if he continues to refuse to comply with the grand jury subpoena. His lawyer did not immediately return a request for comment.

A spokesperson for the special counsel’s office declined to comment.

The DC Circuit heard arguments in early November. Amid reports this month that the special counsel’s office was finishing up its work, the fact that Miller’s case and his legal challenge to Mueller’s appointment were pending raised questions about how much work prosecutors on Mueller’s team had left to do, especially now that they’ve filed charges against Roger Stone.

During arguments, special counsel lawyer Michael Dreeben insisted that there were limits to Mueller’s power, pointing to rules that required him to submit “urgent reports” on major events in the investigation and the fact that whatever official was in charge of the investigation — currently newly confirmed Attorney General Bill Barr — could intervene if Mueller was going to do something “inappropriate or unwarranted.”

Mueller isn’t “off wandering in some free-floating environment,” Dreeben said at the time.

Miller was subpoenaed last 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, and Miller appealed. Howell ordered him jailed until he testifies, but the order was put on hold for as long as he was pursuing an appeal.

The DC Circuit rejected Miller’s other arguments against Mueller’s appointment, finding that the US Supreme Court had held that Congress gave the attorney general power to appoint a special counsel. The court also found that Rosenstein was properly serving as acting attorney general and therefore had the power to appoint Mueller, since Sessions’ recusal was a “disability” that created a vacancy Rosenstein could fill.

