Iran's outgoing President Mahmoud Ahmadinejad warned arch-foe Israel Friday in one of his last public speeches that a regional storm was brewing that would "uproot" the Jewish state.

"I will inform you with God as my witness, a devastating storm is on the way that will uproot the basis of Zionism," Ahmadinejad said in Quds (Jerusalem) Day remarks broadcast on state television.

In a parting shot against Israel, which he has consistently targeted in public comments during eight years in power, Ahmadinejad said it "has no place in this region".

He was speaking ahead of Hassan Rowhani assuming the presidency of the Islamic republic this weekend.

Iran staged massive rallies to mark annual Quds Day, with speeches and sermons supporting the Palestinian cause and condemning Israel.

State television showed hundreds of thousands of people marching across the country, chanting "Death to Israel" and "Death to America".

The demonstrators also denounced any renewed peace talks between Israel and the Palestinian Authority.

In his remarks, Ahmadinejad accused Israel and its Western supporters of fomenting discord in the Middle East, saying "it was their dream to see the will of regional countries bent on destroying (Israel) diverted towards civil war".

"Who is happy for what is happening in Egypt and Syria?" he asked, charging that Israel celebrating the unrest in those countries.