The High Court has granted an injunction to the receivers of Apollo House, which paves the way for it to be vacated.
The Nama-owned building in Dublin city has been used as an unoffical homeless shelter since a group of activists broke in at the end of last week.
After spending a number of hours listening to the submissions from both sides today, Mr Justice Paul Gilligan took an hour to consider everything.
There was complete silence in the packed court room when he returned with his decision and when he said he was going to grant the order.
He said it was clear that the HOME SWEET HOME group was motivated by a genuine concern for the plight of the homeless, but he had to consider the fact that they are "clearly trespassing" as well as the health and safety concerns raised by the receivers to Apollo House.
He also accepted assurances from Dublin City Council that there are enough beds in the city to accommodate those staying in the derelict office building.
Ross Maguire, who is acting for a number of the HOME SWEET HOME campaigners including the musician Glen Hansard, said the exceptional circumstance in this case is that some of the people occupying Apollo House will be rendered homeless if the receivers are given an injunction to have them removed.
But Dr. Dáithí Downey, Director of the Dublin Region Homeless Executive, said that’s not the case.
In his sworn statement, he said they wouldn’t be forced onto the streets because the council has sufficient capacity to serve.
An issue about the suitability of alternatives was raised earlier, with one occupant of Apollo House describing them as “unsafe” for vulnerable users.
The receivers have repeatedly said they do not want to render anyone homeless, but they have concerns about the safety of the derelict building.
The judge said he was not satisfied that what those occupying the office block described as “exceptional circumstances” would justify any other decision in relation to the order.
But he did allow them to stay until 12 noon on January 11, as long as they abide by certain conditions including a cap on the numbers allowed in.
In a statement this evening, Mazars, Receivers to Apollo House, say they hope that Home Sweet Home will work with them to meet the directions of the Court which, in turn, will allow them to work with insurers to try to put in place the necessary insurance to cover the period up to January 11.
Mazars also committed to working with Home Sweet Home, Dublin City Council and homeless agencies over the next three weeks to assist homeless people in Apollo House move to more appropriate accommodation.
They said: "We wish to emphasise that these proceedings were never about the eviction of the people currently in Apollo House but were brought in order to address the serious legal and safety issues arising from the present situation."
Update 6pm: Homelessness Campaigner Fr Peter McVerry said he was now urging the occupiers to vacate the building by January 11, having highlighted the issue of homlessness in an "extraordinary" way and generating public support in a way that "nothing in the last number of years has been able to do".
Update 11pm: Dublin City Council has responded to the court ruling on Apollo House.
They said: "It is important to note the details presented to the court today by Dublin City Council confirms the availability of sufficient emergency accommodation to meet the needs of all persons experiencing homelessness and currently using Apollo House."
They added: "Currently there are enough secure emergency beds available through Dublin City Council and the Dublin Region Homeless Executive (DRHE) to meet the needs of rough sleepers and those who are being accommodated in Apollo House. The additional 230 bed spaces are distributed across four new emergency accommodation facilities with each one having a dedicated service provider attached to it.
"Peter McVerry Trust will provide on-site support for 70 persons at Ellis Quay, Dublin 7. Depaul will provide on-site supports for 75 persons at Little Britain Street, Dublin 7. Dublin Simon and Salvation Army will provide on-site supports for 65 persons at Carman''s Hall. The Civil Defence will provide 20 beds at Wolfe Tone Quay.
"Each of the NGOs has extensive experience in the delivery of services to persons who are homeless and have staff with the required skills and competencies. The DRHE opened two facilities on 9th December at Ellis Quay (70 beds) and Little Britain Street (75 beds). The third facility at Carman’'s Hall will open tomorrow."