A federal appeals court rejected a challenge to Robert Mueller’s appointment Tuesday, marking a major legal win for the special counsel, Politico reports. The lawsuit, brought by Roger Stone associate Andrew Miller after Mueller tried to subpoena him, claimed that Mueller wields so much power as special counsel that he should have been appointed by either the president, the Senate, or the attorney general—not Deputy Attorney General Rod Rosenstein. The court disagreed, also noting that there was nothing wrong with a deputy AG appointing the counsel after then-Attorney General Jeff Sessions recused himself from the investigation. “Special Counsel Mueller effectively serves at the pleasure of an Executive Branch officer who was appointed with the advice and consent of the Senate,” wrote Judge Judith Rogers, in a decision that was joined by Judges Sri Srinivasan and Karen Henderson. The case might not be over, however—Politico notes that even before the appeals court’s decision was handed down, Miller’s attorney Paul Kamenar said they expected to lose and planned to bring the case to the Supreme Court.