Everything was ready, even the T-shirts with the slogan: "Yes, we Kahn". Even the hagiographic biography, with its chapters on extramarital sex leading to its happy ending: its subject's proclamation of eternal love to his celebrity wife. But France woke up today to the news that Dominique Strauss-Kahn, head of the IMF and the man tipped to replace Nicolas Sarkozy next year as French president, was behind bars in New York, charged with the sexual assault of a hotel maid.

Although DSK, as he is known in France, denies the accusations, he's clearly now out of the IMF, out of the French presidential race and, most likely, out of politics altogether.

Before this, DSK had everything going for him: a discredited outgoing president, an opposition party in search of a saviour, and an economic context that made him the ideal man to lead a European country in the midst of the financial storm. He seemed set to win the Socialist party primaries, and to become the second Socialist president of the fifth republic, some 17 years after François Mitterrand. How could he blow his career prospects so stupidly?

This question is so disturbing that many in France think only a setup could explain his fall. Before the sexual assault story emerged, a series of negative stories about him had appeared in recent days: a photograph of him getting into a Porsche; an article in a trashy newspaper about his extravagantly priced suits; a cover story in a major news weekly L'Express about his excessive wealth.

But none of these cheap attacks scored. An opinion poll, published on Saturday – the day of the alleged attack in New York – showed that the French didn't care; DSK remained strongly ahead with voters. Even those on the left who had doubts about his personality and his luxurious lifestyle kept quiet, because they felt France desperately needed his economic skills.

Their hopes now dashed, French Socialists don't have much time to repair the wreckage. There are other possible Socialist candidates, but the battle lines had been developing assuming that DSK would lead the pack. There was a talk of a pact between him and Martine Aubry, the party's leader and mayor of Lille: that if one of them stood, the other would refrain. There was even a rumour of a US-style "ticket", where DSK could be president and Aubry his prime minister. With DSK out, the less-charismatic Aubry will be under pressure to announce her candidacy, if only to prevent another run by her rival Ségolène Royal, the disastrous Socialist candidate of 2007.

But the man to watch is François Hollande. A few months ago political journalists smirked when he announced he would run for the Socialist candidacy. Now they'll take him seriously. He has run a strong pre-campaign, lost weight, and displayed both a sense of humour and a political seriousness. He is the anti-DSK candidate, not so much for his ideas – he is a moderate socialist trying to salvage public services – but for his modest style. Opinion polls make him a credible opponent to Sarkozy; he could win.

But the damage of the DSK affair will weaken the left, and the beneficiary will not be the ruling UMP party. Marine Le Pen, president of the populist Front National, was quick to blast DSK as a symbol of a discredited old political class. Both as a political "outsider" and as a woman in politics, Le Pen could gain most from the scandal.

Disarray among the Socialists, a big boost for the far right – the impact of an event in a New York hotel room, of which we still know very little, is already huge. And in the middle of it all is a man sitting in a police cell, wondering how he could get so close to his goals and then fall so quickly.