President Trump on Friday slammed the military judge who spared disgraced US Army Sgt. Bowe Bergdahl jail time.

“The decision on Sergeant Bergdahl is a complete and total disgrace to our Country and to our Military,” the commander-in-chief tweeted from aboard Air Force One while on his way to a 13-day trip to Asia.

The judge, Army Col. Jeffrey Nance, also ordered that Bergdahl be dishonorably discharged and fined $1,000 a month for 10 months.

The disgraced soldier, whose disappearance resulted in serious injuries to other military personnel who were searching for him, was also stripped of his rank.

Bergdahl, who was held prisoner and tortured by the Taliban for five years after he walked away from his Afghanistan outpost in 2009, pleaded guilty last month to charges of desertion and misbehavior before the enemy.

He was brought home by the Obama administration in May 2014 in a controversial exchange for five Guantanamo Bay detainees.

He originally faced up to life in prison, but prosecutors asked for a sentence of just 14 years behind bars.

Bergdahl’s lawyers asked Nance to give him a dishonorable discharge.

Trump had weighed in on the case, calling Bergdahl a “dirty, rotten traitor” and saying he should be executed or returned to the Taliban.

Nance said he would ignore the president’s inflammatory statements when he imposed sentence.