Officials have set off thundering explosions to topple two cranes that had loomed precariously for days over a partially collapsed hotel in New Orleans.

Authorities said the controlled demolition went “exactly” as planned and efforts will now focus on retrieving two bodies still inside the ruined building.

The explosions sent up massive clouds of dust and sent one crane crashing to the street while the second fell in a way that left much of it resting on the ruined hotel building where officials said it was “stable” and could be removed in pieces.

New Orleans mayor LaToya Cantrell declared the demolition a success at a news conference.

“We know that we are safer now than we have been in the past eight days,” she said, referring to the partial collapse on October 12 of the Hard Rock Hotel, which was under construction near the historic French Quarter.

Three workers died when several floors of the multi-storey building pancaked that day. Only one body could be removed in the days after the collapse.

The two construction cranes were left badly damaged when the hotel’s upper floors collapsed.

The cranes — one around 270ft high, the other about 300ft — weighed thousands of tons. They had been tilting dangerously, and officials had feared the towers would come down on their own, possibly smashing into nearby buildings or severely damaging underground gas and electric lines.

Loud alarms were sounded as curious throngs were kept blocks away before the blasts rocked the quiet of a Sunday afternoon.

The explosions in New Orleans
The explosions in New Orleans (Gerald Herbert/AP)

Ms Cantrell told reporters afterwards that authorities will now focus on bringing out the two remaining bodies.

Fire Chief Tim McConnell, flanking the mayor, said a sewer line was damaged by falling debris from the blasts but efforts were under way to begin repairs.

He also said officials were relieved that nearby gas and electric utilities appeared undamaged after a preliminary assessment.

“I do not think it could have gone much better,” Mr McConnell said. He added that one crane fell and got “hooked on the building like we wanted. It’s very stable”.

He added that it is “way better than what it looks” because of the way it is resting, adding it will now be cut away in pieces by workers using another crane and taken away.

The remains of one worker was removed from the building days ago, but the bodies of the other two are still inside.

Workers are raised in a crane bucket to prepare the cranes for demolition
Workers are raised in a crane bucket to prepare the cranes for demolition (Gerald Herbert/AP)

Experts, including engineers who worked on demolitions following the 9/11 terrorist attacks, were called in to try to come up with a plan to clear the site and prevent further injury and damage before the cranes fell on their own.

The cause of the collapse remains unknown. The Occupational Health and Safety Administration is investigating and, Ms Cantrell and Mr McConnell said, evidence gathering began soon after the collapse.

Lawsuits are already being filed against the project’s owners and contractors, on behalf of some of the more than 20 people injured.