JERUSALEMâ€”PM Olmert said in an interview published on Monday that Israel must withdraw from nearly all the West Bank as well as East Jerusalem to attain peace with the Palestinians and that any occupied land it held onto would have to be exchanged for the same quantity of Israeli territory.

He also dismissed as â€œmegalomaniaâ€ any thought that Israel would or should attack Iran on its own to stop it from developing nuclear weapons, saying the international community and not Israel alone was charged with handling the issue.

In an unusually frank and soul-searching interview granted after he resigned to fight corruption charges â€” he remains interim prime minister until a new government is sworn in â€” Mr. Olmert discarded longstanding Israeli defense doctrine and called for radical new thinking in words that are sure to stir controversy as his expected successor, Foreign Minister Tzipi Livni, tries to build a coalition.

â€œWhat I am saying to you now has not been said by any Israeli leader before me,â€ Mr. Olmert told Yediot Aharonot newspaper in the interview to mark the Jewish new year that runs from Monday night till Wednesday night. â€œThe time has come to say these things.â€

He said traditional Israeli defense strategists had learned nothing from past experiences and seemed stuck in the considerations of the 1948 Independence War. â€œWith them, it is all about tanks and land and controlling territories and controlled territories and this hilltop and that hilltop,â€ he said. â€œAll these things are worthless.â€

He added, â€œWho thinks seriously that if we sit on another hilltop, on another hundred meters, that this is what will make the difference for the State of Israelâ€™s basic security?â€

Over the last year, Mr. Olmert has publicly castigated himself for his earlier right-wing views and he did so again in this interview. On Jerusalem, for example, he said, â€œI am the first who wanted to enforce Israeli sovereignty on the entire city. I admit it. I am not trying to justify retroactively what I did for 35 years. For a large portion of these years, I was unwilling to look at reality in all its depth.â€

He said that maintaining sovereignty over an undivided Jerusalem, Israelâ€™s official policy, would involve bringing 270,000 Palestinians inside Israelâ€™s security barrier. It would mean an ongoing risk of terrorist attacks against civilians like those carried out earlier this year by Jerusalem Palestinian residents with a bulldozer and earth mover.

â€œA decision has to be made,â€ he said. â€œThis decision is difficult, terrible, a decision that contradicts our natural instincts, our innermost desires, our collective memories, the prayers of the Jewish people for 2,000 years.â€

The governmentâ€™s public stand on Jerusalem until now has been to assert that the status of the city was not under discussion. But Mr. Olmert made clear that the eastern, predominantly Arab, sector had to be yielded â€œwith special solutionsâ€ for the holy sites.

On peace with the Palestinians, Mr. Olmert said in the interview: â€œWe face the need to decide but are not willing to tell ourselves, yes, this is what we have to do. We have to reach an agreement with the Palestinians, the meaning of which is that in practice we will withdraw from almost all the territories, if not all the territories. We will leave a percentage of these territories in our hands, but will have to give the Palestinians a similar percentage, because without that there will be no peace.â€

Elsewhere in the interview, when discussing a land swap with the Palestinians, he said the exchange would have to be â€œmore or less one to one.â€

Mr. Olmert also addressed the question of Syria, saying that Israel had to be prepared to give up the Golan Heights but that in turn Damascus knew it had to change the nature of its relationship with Iran and its support for Hezbollah, the Lebanese militia.

On Iran, Mr. Olmert said Israel would act within the international system, adding, â€œPart of our megalomania and our loss of proportions is the things that are said here about Iran. We are a country that has lost a sense of proportion about itself.â€

Reaction from the Israeli right was swift. Avigdor Lieberman, who heads the Yisrael Beiteinu party, said on the radio that Mr. Olmert was â€œendangering the existence of the State of Israel irresponsibly.â€

He added that those who thought Israelâ€™s problem was a lack of defined borders â€” as Mr. Olmert stated in the interview â€” â€œare ignoramuses who donâ€™t understand anything and they invite war.â€

Palestinian negotiators said it was satisfying to hear Mr. Olmertâ€™s words but said the words did not match what he had offered them so far. Yasser Abed Rabbo, a senior Palestinian official, told Palestinian Radio that it would have been better if Mr. Olmert had taken this position while in office rather than while leaving, and that Mr. Olmert had not yet presented a detailed plan for a border between Israel and a Palestinian state.

In theory, Mr. Olmert will continue peace negotiations while awaiting the new government. But most analysts believe that, having been forced to resign his post, he will not be able to close a deal.