The court emphasized that demolition was the only viable solution to prevent potential hazards and safeguard lives.