EVERYTHING was in place to enable Dominique Strauss-Kahn, the IMF head, to declare next month his candidacy for the Socialist primary, ahead of French presidential elections next year. Polls consistently showed that he was the most popular Socialist candidate, and the best placed to beat President Nicolas Sarkozy in a run-off. But Mr Strauss-Kahn's arrest on May 14th in New York, for an alleged sexual assault, has thrown all those plans in the air, and looks almost certain to wreck his political future.

Mr Strauss-Kahn was arrested when he was already aboard an Air France plane at Kennedy International Airport, just minutes before it was due to take off. New York police said he was charged with “a criminal sexual act, attempted rape, and an unlawful imprisonment in connection with a sexual assault” on a chambermaid in a Manhattan hotel. Reports suggested that Mr Strauss-Kahn had left his hotel room in a hurry. His lawyer, Benjamin Brafman, told Reuters that his client would plead not guilty.

The news has rocked the political class in Paris. Martine Aubry, the Socialist Party leader, called it a “thunderbolt”. Others talked of a “cataclysm”. Even were Mr Strauss-Kahn to be cleared eventually of the charges, the prospect of a court case and the intense scrutiny of his private life would make it virtually impossible for him to return to France to fight a primary. Already, in 2008, he faced an internal IMF investigation into an affair with a fellow member of staff. In the end, the fund concluded that Mr Strauss-Kahn had not abused his position, but he accepted their view that he had made “a serious error of judgment”. His wife, Anne Sinclair, a popular and well-known French television journalist, stood by him. The Fund's decision then to keep him on now looks timid and ill-judged.

Even before this latest shock, it was becoming clear that the French presidential campaign was set to be a nasty exercise in low politics. Over the past week or so, doubtless fed by the political right, the French media has been filled with reports about Mr Strauss-Kahn's lifestyle, complete with photographs of his pad in Marrakech and swanky Paris flats. A picture of him getting into a Porsche, belonging to an adviser, set off a fierce and tortured French debate about whether it is possible to be left-wing and rich.

All of this, however, pales in comparison with news of the charges of sexual aggression. The French are well-known for shrugging their shoulders at their politicians' private lives, and consider affairs to be de rigeur rigueur for political leaders. But sexual violence is an altogether different matter. If the charges are proved correct, the tragedy is that Mr Strauss-Kahn was in all other ways a strong and attractive candidate, with the international standing and economic authority needed to challenge Mr Sarkozy in 2012. Now, it looks likely that either Ms Aubry, or François Hollande, the party's ex-leader, will secure the Socialist nomination, after a vote by party supporters this autumn. Without Mr Strauss-Kahn, the French Socialists' chances of winning next year's presidential election, for the first time since 1988, have not collapsed—but the race suddenly looks far more open.

Whatever the fall-out on French politics, Mr Strauss-Kahn's arrest has left the IMF reeling. One insider called it a “disaster”. Although he had been expected to leave within a couple of months, Mr Strauss-Kahn, unless quickly exonerated, will now presumably be forced out far sooner.

That leaves the fund without a political heavyweight at the top in the midst of important negotiations with European policymakers over Greece's debt crisis. Mr Strauss-Kahn was due to meet with Germany's Chancellor Angela Merkel today and attend a crucial meeting of Euro group finance ministers on May 16th. At those meetings the fund's boss was to make clear that the IMF would not go along with more dithering or fudges over Greece's debt mess. Europe would have to come up with more money for Greece fast, or its debt will need to be reprofiled. Even if the fund sends another messenger, its heft in the euro debt mess is significantly diminished without a heavyweight at the top.

If Mr Strauss-Kahn goes, the fund's first deputy managing director, John Lipsky, would take charge. Not only does Mr Lipsky lack Mr Strauss-Kahn's (erstwhile) political stature, he is himself a bit of lame-duck: only three days ago, on May 12th, Mr Lipsky announced that he planned to leave in August. In a short statement released on May 15th, the IMF's spokeswoman had no comment on Mr Strauss-Kahn's arrest, but said that “The IMF remains fully functioning and operational.” That may be true. But there are going to be some gaping holes at the top.

UPDATE May 16th 17:50 GMT Mr Strauss-Kahn has been remanded in custody until his next appearance in court, scheduled for May 20th. A New York judge denied him bail on the grounds that he posed a flight risk. Meanwhile, French radio has reported that Mr Strauss-Kahn's lawyers plan to mount a defence based on evidence showing that their client was having lunch with his daughter when the attempted rape is alleged to have taken place. But there have also been reports that the New York police now say the incident took place earlier than was originally reported.

Another troubling development for Mr Strauss-Kahn is the possible revival of an earlier sexual-assault claim. David Koubbi, a lawyer for Tristane Banon, a 31-year-old French writer, says she may file a criminal complaint against Mr Strauss-Kahn relating to an alleged incident in 2002. At first Ms Banon supposedly did not press charges on the advice of her mother; Mr Koubbi says she now believes her case will be taken more seriously.

UPDATE May 19th 04:45 GMT Mr Strauss-Kahn has resigned from his position as managing director of the IMF, saying he wants to protect the institution and devote his time and energy to proving his innocence. While the fund decides how to pick a new leader, John Lipsky remains acting managing director.

UPDATE May 19th 21:45 GMT A judge in Manhattan granted Mr Strauss-Kahn bail on Thursday, though he will be confined to an apartment in New York. A grand jury has also indicted the former IMF director on several sexual assault charges, the most serious of which carry a 25-year prison term.

(Picture credit: AFP)