The development company representing residents of Longboat Quay, in Dublin's docklands has been given 18 months to complete major fire safety works at the apartment complex.
A judge gave the company more time to carry out €3.88m of remedial works needed to make the complex safe.
The decision effectively defers the threat of evacuation for up to 600 residents of the development's 298 apartments.
Appealing a fire safety notice served by Dublin Fire Brigade in October, Longboat Quay Management Company argued the one-month deadline it had been given to start the works was "manifestly unreasonable."
The company said the works would take nine months to complete and it did not yet have the money.
Its barrister, Patrick Leonard SC, said safety improvements had already been carried out which would reduce risks.
Judge Michael Coghlan agreed to the time extension at an appeal hearing at Dublin District Court, saying it was a "unique case".
However, he voiced concerns that he was being put in the position of having to deal with the "potential for disaster" in the meantime.
He granted an order confirming the fire safety notice but with an extension of time until May 30, 2017, for the completion of the work, which will have to start at some point in 2016.
Dublin City Council's opinion is that the complex "continues to be a potentially dangerous building" until the remedial works are finished, its barrister, Karen Denning BL, said. According to the October 2 fire safety notice, essential remedial works were to have begun by November 1.
Mr Leonard said three of four items in the fire notice had been addressed and €1 million had already been spent on safety measures.
On the issue of funding the major works, he said Longboat Quay Management Company has brought High Court proceedings against Dublin Docklands Development Authority, Gendsong Ltd, which built the apartments, and other parties over liability for funding the major works.
Mr Leonard said he expected these proceedings to be heard in the Commercial Court in April or May next year.
Ms Denning said: "The longer it goes on, the greater the risk of something happening."