A judge in New York has ordered the release of former IMF chief Dominique Strauss-Kahn from prison.
Judge Michael Obus ordered on Friday that he be sent to an unspecified temporary home in Lower Manhattan where he will be detained under armed guard and electronic monitoring.
Mr Strauss-Kahn has now been freed from custody.
He was earlier ordered to post bail of $US1 million (700,000 euros) in cash and a $US5 million bond.
Mr Strauss-Kahn is charged with attempting to rape a hotel maid.
He was supposed to have been released earlier, but there are problems over where he is to live while on bail.
Residents of the Bristol Plaza in Manhattan, where an apartment has been rented by his wife, Anna Sinclair, are reported to have complained about his plans to move in there.
Prosecutors told Judge Obus that the initial location where Mr Strauss-Kahn would be detained, had fallen through.
A sign outside the Bristol Plaza read: ''DSK, Not In my Backyard''.
Defence lawyers and prosecutors returned to court on Friday afternoon to discuss house arrest arrangements.
The New York Post reported he was expected to live in a corporate housing suite belonging to Stroz Friedberg, a security company.
Mr Strauss-Kahn, 62, is yet to enter a formal plea to charges that he tried to rape a hotel maid on 14 May, but has denied the accusations. He faces seven charges.
A formal plea will be entered on 6 June.
Mr Strauss-Kahn announced his resignation from the IMF late on Wednesday.
Four nights in prison
He has spent four nights at the Rikers Island prison in New York City since his arrest on Saturday over the incident at the Sofitel hotel.
Mr Strauss-Kahn was denied bail at a hearing on Monday. Defence lawyers said on Thursday that their client was honourable and would not try to abscond.