The 21,600-pound, 30-foot-long Massive Ordnance Air Blast bomb — nicknamed MOAB and “the Mother of All Bombs” — was so big, it had to be pushed out the rear door of an MC-130 cargo plane, military brass said.

Last week, a US Army Special Forces soldier, Staff Sgt. Mark De Alencar, 37, of Edgewood, Md., was killed in action in Nangarhar.

Army Gen. John W. Nicholson, commander of US forces in Afghanistan, said in a statement that the strike was designed to minimize the risk to Afghan and US forces in the Achin area “while maximizing the destruction” of ISIS fighters and tunnels, bunkers and caves.

“This is the right munition to reduce these obstacles and maintain the momentum of our offensive against ISIS-K,” he added, using the military’s acronym for the Afghan ISIS affiliate.

Trump, who during the campaign promised to “bomb the s- -t” out of ISIS, lauded the mission and said he had authorized the military to act.

“We have the greatest military in the world, and they’ve done a job as usual. We have given them total authorization, and that’s what they’re doing, and frankly, that’s why they’ve been so successful lately,” he said, before taking a shot at President Barack Obama without naming him.

“If you look at what’s happened over the last eight weeks and compare that really to what’s happened over the past eight years, you’ll see there’s a tremendous difference, tremendous difference,” Trump said.

Asked if the bombing sent a message to North Korea, Trump was unusually equivocal.

“I don’t know if this sends a message. It doesn’t make any difference if it does or not. North Korea is a problem, the problem will be taken care of,” he said.

Casualty figures from the strike were not immediately clear, but White House spokesman Sean Spicer said the military “took all precautions necessary” to prevent civilian casualties.

“The United States takes the fight against ISIS very seriously, and in order to defeat the group, we must deny them operational space, which we did,” Spicer said.

Adam Stump, a Pentagon spokesman, said the MOAB had been brought to Afghanistan “some time ago” for potential use.