Anti-capitalist protesters have agreed to leave the disused Shoreditch courthouse they have been occupying since December after reaching a court settlement with the building’s owners.

Members of Occupy Justice – based at the former Old Street Magistrates’ Court – will hand the grade II-listed property back to developers Mastercraft Ltd on January 23 following the company’s application for an interim possession order on January 3.

The campaigners will remain in control of the building until then.

In a statement on their website, they said: “Occupy London would like to thank Mastcraft for having the imagination to work with us in giving this fine building a new lease of life – as well as perhaps the last ever trials to take place in the building – while it awaits redevelopment. We hope this agreement will serve as a model for others to follow.”

The group say they are using the courthouse, renamed Occupy Justice, to “put the 1 percent on trial” by inviting people they believed had caused the financial crisis to defend themselves.

A spokesman for Mastcraft, who bought the Old Street property in 2008, said at the end of December that work to transform the courthouse into a luxury hotel was planned to start within the next month.