Associated PressInternational Monetary Fund leader Dominique Strauss-Kahn listens to proceedings in his case in New York state Supreme Court, Thursday, May 19, 2011.

NEW YORK — Lawyers arguing whether ex-IMF chief Dominique Strauss-Kahn should get out of jail while he awaits trial on attempted rape charges have used two famous examples from different sides of the spectrum to make their case — Roman Polanski and Bernard Madoff.

Prosecutors brought up Polanski, the French filmmaker whom U.S. authorities pursued for decades after he jumped bail in a 1977 child sex case.

Defense lawyers have mentioned Bernard Madoff, the financier who was freed on high bail and strict house arrest, the same conditions that a judge approved Thursday in a bail package for Strauss-Kahn.

The onetime potential French presidential contender is charged with sexually attacking a New York City hotel maid. He denies the allegations.

After Strauss-Kahn spent nearly a week in police custody and then jail, the judge agreed to free him on $1 million cash bail plus an additional $5 million bond — provided he's confined to a New York apartment, under armed guard and electronic monitoring.

He wasn't immediately released from the city's bleak Rikers Island jail, where he had been kept in protective custody and on a suicide watch. But his lawyers expect he'll get out Friday, after he posts the bond and authorities review the security arrangements involved in his house arrest.

The 62-year-old French economist and diplomat briefly wore an expression of relief after state Supreme Court Justice Michael J. Obus announced his decision in a packed courtroom. Later, Strauss-Kahn blew a kiss toward his wife.

Strauss-Kahn didn't speak during the court proceeding. But as he headed back to jail for what he hoped would be a final night, lawyer William W. Taylor called the bail decision "a great relief for the family" and said Strauss-Kahn's mindset was "much better now than before we started."

The ex-IMF head is accused of attacking a 32-year-old housekeeper Saturday in his $3,000-a-night hotel suite. The West African immigrant told police he chased her down a hallway in the suite, forced her to perform oral sex and tried to remove her stockings.

"The proof against him is substantial. It is continuing to grow every day as the investigation continues," Manhattan assistant district attorney John "Artie" McConnell told the judge Thursday as prosecutors announced that Strauss-Kahn had been indicted on charges including attempted rape and a criminal sex act.

The indictment, a crucial procedural step in a felony case, marked a grand jury's "determination that the evidence supports the commission of non-consensual, forced sexual acts," District Attorney Cyrus R. Vance Jr. said. Strauss-Kahn, whose lawyers have suggested evidence won't support a forcible encounter, is due back in court June 6.

The bail decision came less than a day after Strauss-Kahn resigned as managing director of the IMF, the powerful organization that makes emergency loans to countries in financial crisis.

In his resignation letter, he denied the allegations against him but said he would quit in order to "protect this institution which I have served with honor and devotion" and to "devote all my strength, all my time and all my energy to proving my innocence."

Prosecutors had argued against his release, citing the violent nature of the alleged offenses and saying his wealth and international connections would make it easy for him to flee.

At his arraignment Monday, a prosecutor suggested that if Strauss-Kahn were released and ran, he could end up "just like Roman Polanski," whom the Swiss government declined to extradite last year in the child sex case in the U.S. in which he had jumped bail decades ago.

On Thursday, defense lawyers offered a notorious example of their own: Madoff, the fraudulent financier who stole billions of dollars from investors. Before Madoff pleaded guilty in the federal case and was sentenced to 150 years in prison in 2009, he was freed on $10 million bail, under house arrest and private guard provided by the same firm Strauss-Kahn's lawyers have proposed to monitor him. Taylor cited Madoff as he noted in court that "there have been other high-profile cases where (defendants) have been released."

Taylor called the proposed arrangement "the most restrictive possible conditions," although he suggested few precautions were necessary.

"In our view, no bail is required to confirm Mr. Strauss-Kahn's appearance. He is an honorable man. He will appear in this court and anywhere else the court directs, and he has only one interest at this time, and that is to clear his name," Taylor said.

A different judge had ordered Strauss-Kahn held without bail Monday; his lawyers subsequently added home confinement to their bail proposal. His wife, the French television journalist Anne Sinclair, has rented a Manhattan apartment for the couple, Taylor said.

Supreme Court Justice Michael J. Obus said the conditions played a major role in his decision to allow bail, but he warned Strauss-Kahn he might reconsider "if there is the slightest problem with your compliance."

Strauss-Kahn nodded in response. Dressed in a gray suit and an open-necked blue dress shirt, he had arrived stony-faced, though he turned to give a quick smile to his wife and daughter Camille, seated in the audience along with about 100 reporters. They and other journalists, lining a sidewalk below, formed the biggest media throng at the courthouse at least since Mark David Chapman was arrested in 1980 for killing John Lennon, court spokesman David Bookstaver said.

In France, a Socialist lawmaker and longtime Strauss-Kahn ally, Francois Pupponi, expressed relief at the decision to allow the former finance minister to leave jail. "There's finally a bit of good news in a terrible week," he said on BFM-TV. "We were no longer expecting good news."

The political wrangling over who will succeed Strauss-Kahn at the IMF already has begun. European officials, including Germany's chancellor, the European Commission and France's finance minister, have argued that his replacement should be a European.

Some authorities from China and Brazil have said it is time to break Europe's traditional dominance over the position and appoint someone from a developing nation. U.S. Treasury Secretary Timothy Geithner has asked for an "open process," without mentioning specific candidates.