A federal appeals court cleared way for the US army to detonate several tons of degraded bomb-making material at an Iowa ammunition plant, hours after Donald Trump halted the planned demolition and urged the court to first sign off on what he called the safest way to resolve the situation.

“I feel the proper course is to get rid of this longterm problem but, at the same time, have ordered the Military not to do so until such time as the Eighth Circuit agrees that we can go forward, and am further making this decision fully subject to the incoming Governor-Elect, Rob Sand, agreeing to the operation,” Trump said in a Truth Social post.

The detonation of 68 barrels containing nearly 9,500lb of lead azide held at the Iowa Army Ammunition Plant was initially planned for Friday, but the army has since changed the date three times after an outpouring of public concern about potential health and environmental effects.

They had most recently planned for a detonation this coming Wednesday, saying the weather was most favorable that day.

In a court filing, the US Department of Justice notified the appeals court that the army would invoke an emergency exception to go ahead with the explosion. But that was challenged in court by the Iowa Environmental Council and the Sierra Club’s Iowa chapter, arguing that the EPA had skipped necessary permitting steps.

The court then put an administrative stay on the permit so that it could review the emergency motion. In response, the government said there is “an immediate risk” that the lead will explode as temperatures drop below 30 degrees in the upcoming days.

According to the Des Moines Register, the filing said that the lead azide, an explosive made of lead and nitrogen used primarily in detonators and blasting caps, is more susceptible because the blast doors to bunkers containing the compound had been removed and could not be replaced.

Nearly 400 people live in Middletown, a small town in southeastern Iowa, where the plant is sited, and thousands more in surrounding areas could be affected by detonated material that could disperse in the air and land on the ground.

The army has warned that the blast could release a plume of toxic lead dust extending up to 100 miles northeast, possibly reaching cities such as Wapello and New Boston, Illinois.

Trump said he preferred to take care of the volatile material as soon as possible and that a controlled detonation would be much safer.

Trump said that “experts”, including in the military, “feel that this approach will be a far safer one than allowing the situation to fester, not knowing when they will detonate by themselves. This operation would, in other words, be a controlled one rather than a large, spontaneous explosion.”

The Army has said a controlled detonation “to protect the public from the more significant threat from an uncontrolled explosion”.

If Sand, the Democratic governor-elect, and the court do not agree, Trump said the administration will have no choice but to not proceed with the planned detonation, adding that he would hold the incoming governor responsible for “any and all death or destruction caused by this very unfortunate, and longterm, situation”.

In a statement on Monday, Sand called on the federal government to be more transparent with residents and said the Trump administration should make the decision based “the information they have from the people they brought in to do the job months ago and have been on the ground in Middletown for weeks”.

“Everyday Iowans are entitled to know how Middletown came to this situation, and learn why the administration believes this is the best path forward,” Sand wrote on social media, noting that he has been receiving briefings on the operation from the administration. “I’ve asked the federal government to share that information with the public as soon as possible.”

Republican Chuck Grassley, the long-serving Iowa senator, echoed Sand’s call for “increased communication and transparency to the public”.

“My position remains clear – a controlled, safe removal of the lead azide far outweighs a spontaneous catastrophe,” Grassley said. “Final plans should be clearly and expeditiously communicated to the public and all government partners so Iowans can plan accordingly. I will continue to share resources as they are available for Iowans.”