A council has voted to take action to save a Grade II listed ex-psychiatric hospital building at Denbigh which officials say is in a dangerous state.
North Wales Hospital, built in 1844, has been vandalised, looted and fire damaged since it closed in 1995.
Denbighshire council has threatened developers who own the site with the bill for urgent repairs.
Councillors have approved an urgent works order which will involve carrying out a survey of the decaying building.
They are to advise the owners on work that needs to be carried out urgently
A report on the condition of the hospital by Graham Boase, head of planning and public protection, said talks with the owners have failed.
The authority has said that if the developers do not carry out repair work it will step in and pass on the costs.
The developers had planned build up to 280 homes, businesses and community facilities on the site. No work has been done and planning permission has since lapsed.
In November 2008, the main hall in the building was destroyed in a blaze which required 50 firefighters to bring it under control.
The main hall and the roof in the hospital were gutted.
Mr Boase's report says the main building is in a dangerous condition.
He said: "Previous attempts to work with the owner to bring about a viable and acceptable scheme for this site have failed."
He said planning permission had elapsed and there was no sign the owners intend to submit a new application.
The survey aims to detail the work needed to ensure the building is made weather-tight and secure.
This includes removing all the timber and installing a weatherproof roof.
Mr Boase said the Prince of Wales' Regeneration Trust has previously been commissioned to produce a "route map" on a way forward, to guide the council on options available to address "the neglect and structural decline of this important listed building".
He added: "The exposed condition of the listed building presents such a risk that urgent action must be taken to prevent irreparable damage to the building."
The building is now owned by Lancashire-based Freemont Denbigh Ltd.
BBC Wales has made attempts to contact the developers for comment.