A war crimes trial witness who told the court that he killed an Islamic State captive in Iraq in 2017, not a decorated Navy SEAL charged with the slaying, could face perjury charges, the Navy said.

Brian Ferguson, the lawyer for Special Operator First Class Corey Scott, was notified Tuesday that his client's testimony could be used against him if he lied on the stand. Scott was granted immunity in exchange for his truthful testimony.

"We are reviewing Petty Officer Scott's statements in light of his recent testimony but no decisions have been made," said Cmdr. Tam Lawrence, a Naval Special Warfare spokesperson.

Scott testified he killed the young ISIS captive by blocking his breathing tube with his thumb. Gallagher's attorney Tim Parlatore, said at a news conference after the testimony that he is "expecting a not-guilty verdict."

He said he did it after Gallagher unexpectedly stabbed the patient. Scott testified that he was taken aback by the stabbing but that he thought the teen would survive still so he asphyxiated him to prevent him from being tortured by Iraqi forces.

Prosecutors said Scott had never mentioned the asphyxiation in multiple conversations with them before the trial. Scott said they never asked him the cause of death.

The Navy Times reported that Scott likely won’t face any punishment for the death. The paper said it is unclear if there’s any evidence to prosecute Scott except for his own words and Scott indicated that he was the only person who can “say how the detainee died because he was the only SEAL present for his last breath.”

Gallagher, 40, has pleaded not guilty to charges of murder and attempted murder for the stabbing of the prisoner and shooting of civilians in Iraq.

The government rested its case Tuesday after calling its last witness -- a computer specialist who testified that Gallagher had texted a photo to a comrade in which he clutched the hair of the dead captive in one hand and a knife in the other.

GET THE FOX NEWS APP

The specialist also linked Gallagher to a text message sent to a comrade that bragged: "Got him with my hunting knife."

Fox News' Dan Gallo and the Associated Press contributed to this report.