Gallagher, 40, has pleaded not guilty to murder and attempted murder.
Witnesses at his San Diego trial had said they saw Gallagher stab a wounded young Islamic State captive in the neck and shoot at two civilians during his 2017 tour in Iraq.
Scott testified that he, in fact, actually killed him by plugging his breathing tube. Scott said he thought the boy would survive Gallagher's stabbing and wanted to spare him 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.
Let our news meet your inbox. The news and stories that matters, delivered weekday mornings.
The defense has repeatedly argued that Gallagher was being framed by tainted or even false evidence.
On Tuesday the Navy's legal adviser to the commander overseeing the court-martial notified Scott's lawyer, Brian Ferguson, that Scott's testimony could be used against him if he lied.
Capt. Donald King's email said Scott's testimony directly contradicted "previous official statements — thus exposing him to prosecution."
Cmdr. Tam Lawrence, Naval Special Warfare spokesperson, said Scott was granted immunity in exchange for the promise of truthful testimony.
Scott's statements were being reviewed but "no decisions have been made," she said.
Ferguson declined to comment.
Meanwhile, defense lawyers called their first witnesses Wednesday.
Gallagher's superior, Master Chief Petty Officer Brian Alazzawi, testified that Gallagher and his platoon were considered "rock stars" after returning from the 2017 deployment to Iraq in which they aided Iraqi forces in ousting ISIS from Mosul.
But he noticed some platoon members seemed dejected despite the praise.
A month after they were back in San Diego, Alazzawi said Special Operator First Class Craig Miller told him that Gallagher had stabbed a prisoner during the deployment on May 3.
Miller told Alazzawi that he was coming forward because Gallagher was being promoted and nominated for a Silver Star.
Alazzawi said he trusted Miller and found the report credible. He told the troop commander but the alleged war crime wasn't reported outside SEAL team 7 until January 2018 — when Alazzawi got word that several SEALs had planned to go as high as the Navy commodore because nothing was being done.
Alazzawi did not explain why he and the troop commander had taken no action.