Israel's beleaguered prime minister, Ehud Olmert, threw his country and the Middle East into political turmoil last night when he announced he was resigning after months of mounting pressure over corruption allegations.

Olmert said he would step down in September after his Kadima party has chosen a new leader. The main candidates are Tzipi Livni, the foreign minister, a pragmatic centrist, and Shaul Mofaz, transport minister but a hawk on national security issues, including Iran's nuclear ambitions and the ongoing, though faltering, negotiations with the Palestinians.

Last night's announcement came as a surprise but hardly a shock, given the accumulating weight of comment that he could not go on in the face of a slew of police and judicial inquiries.

"I will step aside properly in an honourable and responsible way, and afterwards I will prove my innocence," Olmert told reporters from a podium outside his Jerusalem office. "I want to make it clear - I am proud to be a citizen of a country where the prime minister can be investigated like a regular citizen. It is the duty of the police to investigate, and the duty of the prosecution to instruct the police. The prime minister is not above the law."

Palestinians in the West Bank and Gaza Strip, deeply pessimistic about peace since talks were relaunched at Annapolis in the US last November, are likely to be indifferent to his departure, though Olmert forged personal ties with Mahmoud Abbas, the Palestinian president and Fatah leader. Riad Malki, the Palestinian foreign minister, said: "It's true that Olmert was enthusiastic about the peace process, and he spoke about this process with great attention but this process has not achieved any progress or breakthrough."

A spokesman for Abbas said last night that the Palestinian president considered Olmert's decision an "internal Israeli matter", adding: "The Palestinian Authority deals with the prime minister of Israel, regardless if he is Olmert or somebody else."

Israeli and Palestinian officials said they would continue their efforts to find a peace agreement by the end of the year, in accordance with US deadlines.

Olmert, in office for two and a half years, was also responsible for restarting talks with Syria, through Turkish mediation, but drew criticism that he did so as a diversion from his domestic difficulties. A fourth round of indirect negotiations ended yesterday.

Olmert's reputation was irreparably damaged by the 2006 war in Lebanon, when he was criticised by an official commission of inquiry for having mishandled Israel's response to a cross-border raid by Hizbullah guerrillas, embroiling the country in a month-long war in which civilians were subject to missile salvoes and at the end of which there was no clear victory over the enemy.

But he was credited with having helped restore Israel's battered deterrent capability by bombing an alleged nuclear reactor in Syria and, so many Arabs believed, assassinating a Hizbullah military leader in the heart of Damascus.

Apart from talks with the Palestinians, the biggest issue facing Olmert's successor will be the crisis over Iran's nuclear ambitions. Mofaz, a former chief of staff and defence minister, said recently that an Israeli attack on Iran was "unavoidable" because sanctions were not working.

Israeli political analyst Dan Margalit, an old friend of Olmert, called the prime minister's decision to step down "a sad end to a miserable career". Uri Dromi, another pundit, called Olmert a "lame duck".

Olmert, the cigar-smoking lawyer and bon viveur, succeeded Ariel Sharon, who was felled by a stroke, after the former Likud leader, who founded Kadima, withdrew Israeli troops and settlements from the Gaza Strip in 2005.

The Israeli public reacted with mounting anger and contempt to the news of Olmert's legal problems. Nahum Barnea, a columnist with the Yediot Aharonot newspaper, wrote on the eve of the recent EU-Mediterranean summit in France that the prime minister was finished, but was in denial: "Politicians in Israel, the leaders he will meet in Paris, prosecutors and the police all know it. The only one who refuses to acknowledge it is Olmert."

Primary elections for the Kadima leadership will take place in two rounds in September. The winner will then have 28 days (and 14 more if needed) to form a coalition. If he or she succeeds in doing so, the winner will complete Olmert's term, due to end in 2010. If not, new elections will be held within three months - and the most likely outcome, according to current polls, would be a win for Likud rightwinger Binyamin Netanyahu.

Olmert is the subject of two criminal investigations. One involves suspicions that he took bribes from the American businessman Morris Talansky and the other charges him with submitting duplicate claims for travel expenses in his previous posts as trade minister and mayor of Jerusalem.