Former International Monetary Fund chief Dominique Strauss-Kahn was cleared of pimping charges on Friday in France, putting an end to four years of legal drama that began with a sexual assault charge in a New York hotel room.

The trial hinged on sex parties that took place in the midst of the global financial crisis -- events Strauss-Kahn described as much-needed "recreational sessions" at a time of intense pressure to steer the world through economic peril. He said he did not know the women who took part were prostitutes.

"All that for this?" Strauss-Kahn said as he rose to leave the courtroom with his girlfriend and adult daughter. "What a waste."

In often sordid testimony, the women involved in the sex parties described sometimes-brutal nights that, they said, were not fun for them at all.

The panel of judges ruled that Strauss-Kahn, a one-time French presidential hopeful whose political career was tarnished by the allegations, was not involved in hiring the women or paying them.

Prostitution is currently legal in France, but prostitutes are often arrested and charged for soliciting in public. Brothels, pimping and the sale of sex by minors is illegal.

The verdict was the last step in four years of legal drama for Strauss-Kahn that began when a New York hotel maid accused him of sexual assault in 2011, killing his ambitions to be French president. That case was later settled out of court.

The New York allegations shook France -- both because it lost a leading presidential contender and because it splashed allegations about a French public figure's private life onto media worldwide.

It prompted expectations among many women in France that the country would start holding male politicians accountable for infidelity or other sexual misconduct that had long been ignored.

The maid's accusations prompted some French women to go public with accusations of harassment or other sexual mistreatment by Strauss-Kahn in the past, including a writer who tried to sue him for attempted rape but whose case was thrown out because the statute of limitations had expired.

In the four years since, however, French attitudes have stayed generally unchanged. The media and public largely shrugged when President Francois Hollande was photographed in 2013 by a gossip magazine taking a scooter to visit his lover, unbeknown to his first lady.

Strauss-Kahn, 66, was among more than a dozen defendants, including hotel managers, entrepreneurs, a lawyer and a police chief. They were accused of participating in or organizing the collective sexual encounters in Paris, Washington and in the Brussels region in 2008-2011, when Strauss-Kahn was IMF chief and married. Only one, a hotel manager, was convicted in the pimping case.

During the three-week trial in February, the man known in France as DSK never wavered in his insistence that he did not know that the young women at the parties were prostitutes. He said he thought they were simply "libertine."

The sometimes tearful testimony of two prostitutes cast a harsh light on Strauss-Kahn's sexual practices. But they testified that they had never told him directly about their professions.

Other defendants described how they had voluntarily erected a wall of silence around their powerful friend to protect him from embarrassment.

Even the prosecutor, unusually, asked for Strauss-Kahn's acquittal, saying the trial did not back up the charge of aggravated pimping, which requires proof that he promoted or profited from prostitution. However, the prosecutor asked for conviction of the co-defendants who admitted having organized the evenings and paid the girls.