Dominique Strauss-Kahn resigned Wednesday as head of the International Monetary Fund after explosive accusations that he had sexually attacked a housekeeper in a Midtown hotel room.

“It is with infinite sadness that I feel compelled today to present to the Executive Board my resignation from my post of managing director of the I.M.F.,” he said in a statement dated Wednesday and released early Thursday by the I.M.F. “I think at this time first of my wife — whom I love more than anything — of my children, of my family, of my friends.”

His resignation comes four days after Mr. Strauss-Kahn was taken off an Air France plane at Kennedy International Airport and arrested in connection with the accusations, and a day after Timothy F. Geithner, the Treasury secretary, urged the I.M.F. to appoint an interim managing director.

Mr. Strauss-Kahn, a former French finance minister, had been expected to declare his candidacy for the French presidency soon. He was seen as one of the candidates most likely to defeat President Nicolas Sarkozy.

In issuing his resignation, Mr. Strauss-Kahn said, “I want to say that I deny with the greatest possible firmness all of the allegations that have been made against me.”

French news organizations quickly announced Mr. Strauss-Kahn’s resignation and underscored that he was leaving to focus on proving his innocence. Commentators said it was unusual for Mr. Strauss-Kahn to use personal language, including references to his wife, family and colleagues at the I.M.F.

The selection of a successor will now take an official turn, with the executive board expected to meet quickly, possibly as early as Thursday, to start opening up the application process, said an I.M.F. official who spoke anonymously because of the sensitivity of the situation.

Officials had originally planned to wait for a decision from the grand jury in New York to see whether Mr. Strauss-Kahn would be freed from Rikers Island prison before starting a formal selection process. But as Mr. Geithner and others suggested Mr. Strauss-Kahn step aside, people within the fund were already thinking about the future. “The I.M.F. is not decapitated,” said the official. “But with his resignation, it’s better to find a new managing director quickly.”

The jockeying for his replacement has already begun. The French finance minister, Christine Lagarde, is considered a leading candidate to succeed Mr. Strauss-Kahn, her friend and colleague. Her straight talk has helped burnish Ms. Lagarde’s reputation as one of Europe’s most influential ambassadors in the world of international finance.

Her main competition, analysts say, is Kemal Dervis, a former finance minister of Turkey. Mr. Dervis is credited with rescuing the Turkish economy after it was hit by a devastating financial crisis in 2001, in part by securing a multibillion-dollar loan from the I.M.F. Before that, Mr. Dervis worked at the World Bank for 24 years.

The process for filling the post will begin with member governments nominating their candidates. After that, the executive board typically sets a window for them to present their case and explain how they would manage the institution. The process may not be tension-free, given the tussle between Europe and emerging market countries over a successor. “There may be some horse-trading,” the official said.

On Thursday, the German government said it “respects” Mr. Strauss-Kahn’s decision to resign, saying that it allows the I.M.F. to “return quickly to full ability to act.” It thanked him for “valuable” work during his tenure. Chancellor Angela Merkel is among those pushing for another European to head the bank as uncertainty grows about Europe’s debt crisis.

At the same time, China took the unusual step of reiterating its desire to see a leader representing an emerging market at the helm of the I.M.F. While it has not put forward a candidate of its own, a Chinese Foreign Ministry spokeswoman said it was “paying close attention” to the situation. “In principle, we believe that emerging and developing countries should have representation at senior levels.”

Image Dominique Strauss-Kahn during his arraignment in New York on Monday. Credit... Pool photo by Emmanuel Dunand

In the meantime, the I.M.F. said in its statement Wednesday night that John Lipsky would remain as acting managing director.

Mr. Lipsky can continue until a new chief is appointed. He had already announced plans to leave the agency in August. Normally, a successor is voted by the agency’s 24-member executive board, with large financial contributors like the United States, Japan and China getting a bigger percentage of voting rights.

Europeans want to keep one of their own in a post they have occupied since the I.M.F was created after World War II. But the world’s fast-growing emerging nations say their time has come to run a big institution like the I.M.F., given their growing global economic might.

Writing in the Frankfurter Allgemeine Zeitung, a German daily, the columnist Patrick Welter said: “It’s widely agreed in Europe that a European should success Strauss-Kahn. For the future of the euro zone, it might actually be better to have an outsider, but in the tried and tested division of labor with the Americans, the old principle about the funders having the say dictates that there should be a European I.M.F. boss.”

While at the helm of the I.M.F., Mr. Strauss-Kahn, an economist and politician, had used the European debt crisis to seize, somewhat audaciously, a new and prominent role for the world body. Trying to shed its old image as a hidebound policy task master, the fund refashioned itself as the investment bank of multilateral institutions — doing whatever it took to get the deal done.

Mr. Strauss-Kahn was a leading member of France’s Socialist Party when he was chosen by the newly elected Mr. Sarkozy, a conservative, to be the head of the fund, a job that has traditionally been given to a European.

Mr. Strauss-Kahn’s arrest on Saturday came 10 minutes before his plane was due to depart, at about 4:40 p.m., when two detectives of the Port Authority suddenly boarded Air France Flight 23, as the plane idled at the departure gate.

The police had been called to the hotel about 1:30 p.m., but when they arrived, Mr. Strauss-Kahn had already checked out. At some point, Mr. Strauss-Kahn called the hotel and said that his cellphone was missing. Police detectives then coached hotel employees to tell him, falsely, that they had the telephone, according to a law enforcement official. Mr. Strauss-Kahn said he was at Kennedy Airport and about to get on a plane.

News of the arrest produced an earthquake of shock, outrage, disbelief and embarrassment throughout France.

Though Mr. Strauss-Kahn received generally high marks for his stewardship of the bank, his reputation was tarnished in 2008 by an affair with a Hungarian economist who was a subordinate there. The fund decided to stand by him despite concluding that he had shown poor judgment. He issued an apology to employees at the bank and his wife, Anne Sinclair, an American-born French journalist.

Mr. Strauss-Kahn’s extramarital affairs have long been considered an open secret. But the legal charges against him — which include attempted rape, forced oral sex and an effort to sequester another person against her will — are of an entirely different magnitude, even in France and elsewhere in continental Europe, where voters have generally shown more lenience than Americans toward the sexual behavior of prominent politicians, most notably the escapades of Prime Minister Silvio Berlusconi of Italy.

Suspicions are widespread in France that Mr. Strauss-Kahn may have been set up. On Wednesday, a poll conducted by CSA showed that 57 percent of people surveyed thought he was “the victim of a plot.” Seventy percent of respondents from his Socialist Party also agreed with the theory.

Still, as Mr. Strauss-Kahn’s lawyer prepared to renew efforts obtain his release on bail, France was quickly recalculating the impact on the political landscape.

As the country heads into a presidential election next year, those questioned by CSA believed Mr. Sarkozy had the most to gain from Mr. Strauss-Kahn’s downfall, followed by the far-right National Front candidate, Marine Le Pen, and François Hollande, the current Socialist front-runner.

Ms. Le Pen wasted little time turning the spotlight back on Mr. Sarkozy. “I wonder if Mr. Sarkozy is considering the responsibility he bears for having sent Dominique Strauss-Kahn to the I.M.F.,” she said after news of Mr. Strauss-Kahn’s resignation emerged. She said that France needed to learn a lesson from his arrest, and ensure that “rich and poor are treated with an equal footing.”