A New York judge dropped all criminal sexual assault charges against ex-IMF chief Dominique
Strauss-Kahn on Tuesday after prosecutors lost faith in the credibility of his accuser.
But the formal end of the case awaited the outcome of a last-ditch emergency appeal.
New York State Supreme Court Justice Michael Obus accepted the prosecutors' request for dismissal of all charges. The move left the man once seen as the leading contender to be the next president of France close to freedom and the chance to try to rebuild his tarnished political career.
The former head of the International Monetary Fund appeared in court with his wife Anne Sinclair by his side and the pair left the hearing smiling, amid a throng of media.
He later issued a statement saying his life in recent months had been a "nightmare" and that he looked forward to life returning to more normal times.
Strauss-Kahn was not yet free to return to France, after New York State Supreme Court Justice Michael Obus stayed his dismissal of the case for an emergency appeal.
A lawyer for the accuser, hotel maid Nafissatou Diallo, had requested a special prosecutor to continue the criminal case. Earlier on Tuesday, Obus dismissed the request. But Diallo's lawyers appealed that decision. Obus said the appeal's court would rule on that later on Tuesday, meaning Strauss-Kahn must await that verdict before he is free to return to France.
Strauss-Kahn thanked friends in France and in the United States "who have believed in my innocence" and said he was "most deeply grateful to my wife and family."
"We will have nothing further to say about this matter and we look forward to returning to our home and resuming something of a more normal life," he said.
Strauss-Kahn is not entirely in the clear. Diallo has filed a civil lawsuit against him, and he faces a separate inquiry in France from a writer who alleged Strauss-Kahn forced himself on her during a 2003 interview in Paris.
Diallo's lawyers are also taking the case to France where they had been trying to establish a pattern of sexual abuse by Strauss-Kahn and had tried to contact other women who may have had similar encounters.