Cmdr. Aaron Rugh (third from left) is officially sworn in as an appeals court judge at the Washington Navy Yard alongside Col. Brian Palmer, Cmdr. Anne Marks, and Lt. Col. Troy Campbell. (Natalie Morehouse/U.S. Navy photo)

On the day Cmdr. Aaron Rugh stood in a Washington courtroom and was ceremonially sworn in as an appellate judge last year, he had already served as a trial judge and the Navy’s top prosecutor.

Rugh, a longtime colleague said later, was “a rock star” in the military justice community — slated for promotion to captain and considered a strong contender to eventually become the Navy’s chief judge. Then The Washington Post revealed that Rugh had given false information to a board of officers deciding whether a Marine he had ­prosecuted for sexual misconduct should be expelled from the ­service.

Now his future — and potentially dozens of criminal appeals he has overseen — is being threatened by the fallout from the flawed investigation into Marine Maj. Mark Thompson, a former instructor at the U.S. Naval Academy convicted of having sex with two female midshipmen.

At the Washington Navy Yard last week, Rugh testified at an ethics hearing before a senior officer probing whether he lied under oath in 2014 about two witnesses. Thompson is accused of lying to the same board and faces a second court-martial because of The Post’s revelations about his case.

Marine Maj. Mark Thompson taught history at the U.S. Naval Academy before being found guilty of sexual misconduct. (Nikki Kahn/The Washington Post)

The controversy surrounding Rugh has exposed the military’s lack of transparency when judges are accused of misconduct. For weeks, the Navy wouldn’t ­acknowledge that the inquiry ­delayed Rugh’s promotion or that the 20-year veteran is under ­review.

After this report was published online Wednesday, the Navy’s deputy chief of information, Capt. Amy Derrick, told the The Post that Rugh was indeed the subject of an ethics investigation launched in August and that a hearing had been held Oct. 3.

Rugh’s attorney, retired Rear Adm. Christian L. Reismeier, wouldn’t comment on what his client said at the ethics hearing. But he denied that Rugh, 44, had intentionally misled the board. In an email, Reismeier called the alleged misstatement an “honest mistake” based on information that Rugh believed to be true at the time.

“CDR Rugh is one of the most highly-respected judge advocates on active duty in the Navy,” wrote Reismeier, who served as the Navy’s chief judge. “He has an impeccable reputation for rigid adherence to the highest ethical standards, as well as to ­truthfulness, honor, integrity and fairness.”

But already, one defense attorney has argued that Rugh shouldn’t have ruled on a case that claims another prosecutor acted inappropriately.

In April, Navy Lt. R. Andrew Austria contended in a motion that the question surrounding Rugh’s impartiality “is not hypothetical. It is real” and “compounded by the fact that this case involves allegations of prosecutorial misconduct — the same behavior of which Judge Rugh is accused.” He indicated that a preliminary inquiry into the judge’s behavior was already underway.

Rugh declined to step aside, finding that Austria had failed to demonstrate how the accusation would influence his ­decision-making.

Retired Lt. Col. Joshua Kastenberg, who handled more than 200 trials as an Air Force judge, questioned Rugh’s decision to remain on the court while under review.

“You could see every case that Rugh is sitting on being recalled,” said Kastenberg, now a professor at the University of New Mexico. “If I had a formal investigation against me of wrongdoing, I would disqualify myself for the duration of it.”

Eugene R. Fidell, who teaches at Yale Law School, didn’t disagree but cautioned that a mere accusation shouldn’t force a recusal. “Judges, like everybody else,” he said, “are entitled to a presumption of innocence.”

The investigation only became public two months ago when the judge presiding over new charges against Thompson acknowledged at a hearing that Rugh is under scrutiny. The development was first reported by Military.com. The Navy initiated an inquiry after Thompson’s defense attorney, Kevin B. McDermott, filed an ethics complaint, a copy of which was obtained by The Post.

“Ironically, Major Thompson is being criminally prosecuted for making false statements before the same board,” McDermott wrote, arguing that Rugh had either lied or failed to correct a “grossly negligent misrepresentation.”

In 2013, Rugh led the prosecution against Thompson, who was accused of raping one student and having a consensual relationship with another. Thompson was found guilty of five charges but acquitted of sexual assault.

After serving two months in a Virginia brig, Thompson faced what is known as a board of inquiry, which would decide his fate in the military.

The government called Rugh, then still a prosecutor, to testify by phone about one narrow aspect of the case. But the three board members wanted to know more.

Sarah Stadler, one of Thompson’s accusers, had alleged at trial that they had sex a final time on the night of her graduation — but he had a compelling alibi.

So one board member asked Rugh how the government had proved that they had seen each other that night. Investigators, Rugh explained, had contacted family members who had rented a house in Annapolis for the ­ceremony.

“Now, we went and interviewed her family, her brother, etcetera,” he said. “They remember her, you know, they verified that they had the rental house, that she was there for a little while and then left the house and came back later that evening.”

Rugh then explained why he hadn’t called them as witnesses.

“None remembered with such specificity that we ever put any evidence on of that particular night,” he said. “So we didn’t call her brother to come in and testify that he was, you know, that he was sitting there on the couch when she came in later that evening.”

Stadler’s mother, Laurel, later told The Post that the former prosecutor’s statement was “a complete and total lie.” She and her son denied that they had ever spoken to investigators about the case.

Laurel Stadler confirmed last month that she told the same thing to a military attorney who contacted her as part of the Rugh investigation.

Last week, his lawyer offered the first public explanation for the judge’s disputed comments.

“When he gave his statement, he believed the facts about the family came from someone investigating the case for the government,” Reismeier said in an email. “Based on our investigation, CDR Rugh was told these facts in a way that he misunderstood the source of the information.”

But Reismeier refused to say who told his client about witness interviews that apparently never occurred.

Rugh acknowledged to Thompson’s board of inquiry that he had not reviewed the case file in preparation for testifying, a decision military law experts decried as negligent.

Retired Lt. Col. Kate Germano, one of the three Marines on the board, said Rugh’s contested testimony further illustrates how troubled Thompson’s case was.

Unconvinced that the ­government had proved Thompson was guilty, the board allowed him to remain a Marine. Germano and another member went even ­further, writing in a letter that all three believed the court-martial jurors had “erred in their findings.”

But earlier this year, after being contacted by The Post, Stadler found her old cellphone, which contained text messages with Thompson that showed he had lied to the board about their relationship. The exchanges revealed that she hadn’t seen him on her graduation night — as Stadler remembered and the prosecution alleged — and instead met him the following evening.

Germano and the other members, she said, were “fully embarrassed” by the revelations after risking their careers to oppose the jury’s conclusion. “We made the decision that we made based on the investigation and evidence . . . that we had,” she said. “Clearly that was flawed.”

Rugh, meanwhile, continues to wait for the Judge Advocate General’s Corps to determine his fate and the Navy to decide whether he will be promoted to captain — one step from rear admiral. Excluding admirals, Navy records show that among the nearly 140 active-duty JAG officers chosen to advance in rank in fiscal 2016, he is the only one who hasn’t.

It remains unclear whether the military will reveal the results of its investigation.

In response to requests from The Post, the Navy, Army and Air Force, citing privacy laws, refused to provide the names of any judges who had been reprimanded over the past decade.

Reismeier, in comments he made as a legal expert before becoming Rugh’s attorney, ­criticized the military’s unwillingness to be open about judicial impropriety.

“The trust and confidence people have in that judge has to be the first concern for anybody who runs a judicial system,” he told The Post. “When you have ­allegations against a judge that aren’t visible to the public in any way, shape or form, you do run the risk of undermining confidence in the system.”

Unless Rugh is criminally charged or faces other severe discipline, the military won’t be obligated to share the investigation’s results with the public. But Derrick, the spokeswoman, said Wednesday that the Navy will strive to be open about the high-profile case.

“We have an obligation,” she said, “for transparency.”

Ann Marimow and Julie Tate contributed to this report.