Former IMF chief Dominique Strauss-Kahn is due to be released from prison today after being granted bail by a New York court.
A judge in New York set bail at $1m and imposed an insurance bond of $5m.
Strauss-Kahn will be placed under 24-hour home detention with electronic tagging - conditions he had already agreed to.
The 62-year-old, who has been charged with the sexual assault and attempted rape of a hotel maid, will also be monitored by an armed guard at his own expense.
It was the second time in days he had asked to be freed from detention.
He also signed an affidavit waiving his extradition rights.
He is spending one more night at the notorious Rikers Island prison, where he has been on suicide watch, before being released from custody after paperwork is signed.
His lawyers welcomed the decision to grant bail, saying they were "very relieved" and expect to return to court on June 6, when their client will formally answer charges.
Prosecutors confirmed Strauss-Kahn was indicted by a grand jury, which means he will go on trial if, as expected, he pleads not guilty.
His lawyer told the court his French client, who has resigned as managing director of the IMF , was an "honourable man" who would not skip bail.
He said the prospect of the accused "teleporting" himself to France was "ludicrous" as his face was well-known.
Strauss-Kahn's wife and daughter were in court for the hearing.
Prosecutors argued he had no right to be released, claiming the evidence against him was mounting.
Strauss-Kahn was denied bail on Monday after the prosecution successfully argued he was a flight risk.
In a resignation letter to the IMF's board on Thursday, he wrote: "I deny with the greatest possible firmness all of the allegations that have been made against me.
"I want to protect this institution which I have served with honour and devotion, and especially I want to devote all my strength, all my time, and all my energy to proving my innocence."
Strauss-Kahn became managing director of the organisation in 2007, earning £271,000 ($440,000) a year after tax plus an annual tax-free expense allowance of £48,000 ($79,000).
His third wife Anne Sinclair is the daughter of a millionaire art dealer and one of France's best known TV journalists.
The couple are believed to own properties in Washington DC, central Paris and Marrakech.
The 32-year-old hotel maid, whose identity is being protected, gave her side of the story to the grand jury on Wednesday.
The hearing was held in secret and it is not known what she said.
Her lawyer Jeffrey Shapiro dismissed speculation she would also pursue Strauss-Kahn for damages in a civil suit.
He said: "It's not contemplated and it's not been discussed... I'm helping her get through each day."
Strauss-Kahn was detained by New York police on Saturday aboard an Air France flight minutes before it was due to depart for Paris.
If the case goes to trial and he is convicted, he faces up to 25 years in prison.