State Supreme Court Justice Michael Obus immediately approved the prosecutors' request to abandon a case they deemed untenable as a result of constant lying by the hotel maid accusing Strauss-Kahn of sexual assault.
A last-ditch attempt by a lawyer for the maid to reverse the dismissal by handing the case to a special prosecutor was turned down in a New York appeals court.
From that moment, what the former International Monetary Fund chief called his "nightmare" was over.
However, in a bizarre twist, a rare earthquake along the US eastern seaboard caused early closing of court offices, meaning Strauss-Kahn still had to wait until Wednesday to collect his passport, which had been confiscated at the time of his arrest on May 14.
The 62-year-old looked relieved as he left the courthouse, accompanied by his millionaire French wife Anne Sinclair, who has stood by his side ever since the sensational sex scandal erupted.
"This is the end of a terrible and unjust ordeal," Strauss-Kahn told reporters after returning to the luxury Manhattan rental residence where he has spent much of the last three and a half months under house arrest.
"I'm eager to return to my country," he said, pledging to speak at "greater length" once back in France.
Strauss-Kahn said he was "relieved" for his wife, children and "everyone who has supported me at this time by sending me letters and emails."
But even if he returns to public life in France, Strauss-Kahn's reputation has been badly sullied by an affair that forced him to resign as head of the IMF and put his French presidential dreams on hold.
Demonstrators, many of them women, hurled insults outside of the courtroom. One, referring to Strauss-Kahn by the initials by which he is known in France, shouted: "DSK, you're a sick bastard and your wife is even sicker."
The District Attorney's Office defended its decision to drop the case, saying that despite strong initial evidence of a possible sexual assault, there was no definitive proof, while the maid herself could no longer be believed.
Prosecutor Joan Illuzzi-Orbon said she did not take the decision "lightly," but added that the accuser, immigrant chambermaid Nafissatou Diallo, had "severely undermined her reliability as a witness in this case."
District Attorney Cyrus Vance issued a statement justifying his decision as "absolutely the right one, legally and ethically."
"If we are not persuaded -- beyond a reasonable doubt -- that a crime has been committed, based on the evidence we have, we cannot ask a jury to convict," he said.
The case garnered world attention on May 14 when Strauss-Kahn was escorted away by New York police from his first class seat on an Air France plane moments before its departure for Paris.
Prosecutors initially said they had strong evidence that Strauss-Kahn forced Diallo into oral sex in his luxury Sofitel hotel room and tried to rape her.
Even now, prosecutors stress the DNA evidence shows Strauss-Kahn did engage in a sex act with the maid in his suite, ejaculating over her uniform. However, they say they cannot prove to a jury that the sex was forced.
The case first began to unravel when prosecutors discovered that Diallo had been caught lying on her asylum application form, including about a gang rape she said she had suffered in her native Guinea.
She was also said to have discussed Strauss-Kahn's wealth in a telephone conversation with a Guinean friend currently held in a US prison, and to have changed sworn testimony to the grand jury considering the case.
In their 25-page motion filed Monday asking the judge to dismiss all charges, prosecutors said Diallo was "persistently, and at times inexplicably, untruthful in describing matters of both great and small significance."
"The nature and number of the complainant's falsehoods leave us unable to credit her version of events beyond a reasonable doubt, whatever the truth may be about the encounter" at the hotel, they added.
Strauss-Kahn could, in theory, return to frontline French politics, but few in France expect a prominent role for him any time soon.
"I don't think he can hope for a center stage role in French politics now," said Gerard Grunberg of the prestigious Sciences-Po school in Paris, where Strauss-Kahn once taught.
"His public image is much deteriorated, and the Socialist Party and its leaders must be mad at him for having missed this moment of opportunity. Neither the public nor the party want to see him back on the frontline."
Strauss-Kahn also faces a civil suit filed in a Bronx court seeking unspecified damages for an alleged "sadistic" attack on May 14.