On the witness stand, Special Operator Scott minimized the stabbing, saying the chief had stabbed the captive only once, that there was no blood coming from the wound afterward and that the stab wound was not life-threatening. He testified that after the stabbing, the captive was still in stable condition, but that he then placed his thumb over the captive’s breathing tube, asphyxiating him.

A Navy prosecutor immediately leapt from his chair in the courtroom and angrily accused Special Operator Scott of lying, saying that on one crucial point after another, his testimony contradicted what he had told Navy criminal investigators and lawyers in at least five interviews.

Special Operator Scott, who made eye contact with Chief Gallagher and with Timothy Parlatore, the chief’s defense lawyer, several times during his testimony, seemed unshaken by the accusation. He said he had never told investigators that he killed the captive because no one had bothered to ask.

The medic testified under the protection of a sweeping grant of immunity from the Navy, shielding him not just from criminal prosecution but also from other consequences, like being stripped of his elite assignment with the SEALs or being given a less-than-honorable discharge.

However, the immunity agreement covers only truthful testimony, and is void if he is found to have lied under oath. A conviction for perjury would clear the way for the medic to be jailed, forced out of the military, or both.

In court on Wednesday, Judge Aaron Rugh, who is presiding over Chief Gallagher’s court-martial, said Special Operator Scott’s testimony could not be used against him unless it was untrue: “I think it’s pretty clear his statements can’t be used for any purpose other than perjury that occurred in this courtroom.”

When a prosecutor asked Special Operator Scott in court last week why he had waited until he was on the stand to assert that he had killed the captive, the medic replied that Chief Gallagher had a wife and family, and said, “I don’t think he should spend the rest of his life in prison.”