A decorated Navy SEAL who was acquitted of murder in the death of a teenage ISIS fighter thanked President Donald Trump and Fox News on Wednesday for championing his defense.

Special Operations Chief Edward Gallagher, 40, was acquitted Tuesday by a military jury in San Diego of charges that he fatally stabbed the wounded, teenage prisoner in 2017 and shot two civilians from a sniper's perch in Iraq.

"I want to say thank you to you, Fox News — to you guys, Pete, for being with us from day one," Gallagher told Fox News Channel host Pete Hegseth in an interview that aired Wednesday morning on "Fox & Friends."

"You guys backed us from the beginning. I also want to say thank you to Congressman Duncan Hunter and Congressman Ralph Norman, and also to President Trump for intervening when he did," Gallagher said of GOP Reps. Hunter of California and Norman of South Carolina.

Later Wednesday morning, Trump returned the praise, tweeting: "Congratulations to Navy Seal Eddie Gallagher, his wonderful wife Andrea, and his entire family. You have been through much together. Glad I could help!"

Trump helped get Gallagher transferred from a military brig to less-restrictive barracks before trial. The president had also hinted prior to the verdict that he may have pardoned Gallagher had the SEAL been convicted.

Gallagher had faced a host of charges — including murder, attempted murder of two noncombatants, and wrongful posing for an unofficial picture with a human casualty.

He was found not guilty of all but the least serious accusation, that he posed for a picture with the corpse of the young fighter for the Islamic State militant group, an act which defense lawyers admitted he had done. That conviction carries a sentence of up to four months in prison, but Gallagher has already had nine months of pretrial confinement.

The court on Wednesday ordered him released based on time served.

The court also ordered Gallagher to be dropped in rank from chief to petty officer first class — though defense lawyers vowed to fight the demotion.

But in court, Gallagher tugged at his collar and made an over-the-shoulder, throwing motion, signifying his possibly lost rank.

Defense lawyer Tim Parlatore said his client's worst fear is now a reduction in pension from the possible demotion.

"The fact that two years they have been worried about whether he'll spend the rest of his life in jail and now we're just arguing over how big his pension is ... it's a tremendous victory," Parlatore said in an interview with NBC News.

The Gallagher family said in a statement released by the law firm Wednesday that Gallagher was taken into pre-trial confinement on Sept. 11 but that “he will spend this July 4th with his family celebrating not only our nation’s freedom, but also his own.”

“Although we are thankful for yesterday’s verdict and to the service members who served on the jury, we will continue to fight on SOC Gallagher’s behalf to protect the full retirement benefits he earned over the duration of his 20 years of service,” the Gallagher family.