"This regime, thanks to God, has lost the reason for its existence," Ahmadinejad told a crowd of thousands gathered at a rally in support of the Palestinians in the capital Tehran.
"Efforts to stabilize this fake (Israeli) regime, by the grace of God, have completely failed... You should believe that this regime is disappearing," he said.
Ahmadinejad also called Israeli leaders a "group of terrorists" and threatened any country that supports the Jewish state, as millions of Iranians took to the streets for anti-Israel protests.
"You imposed a group of terrorists ... on the region," Ahmadinejad said, addressing the U.S. and its allies. "It is in your own interest to distance yourself from these criminals... This is an ultimatum. Don't complain tomorrow."
"Nations will take revenge," he told hundreds of thousands of supporters at a pro-Palestinian rally in the capital Tehran.
Ahmadinejad also called the U.N. Security Council "illegitimate," ahead of diplomats' planned circulation of a draft resolution on Iran next week.
Millions of Iranians took part in rallies held in every major city across Iran for "Al-Quds Day," the Arabic name for Jerusalem. Many became anti-American protests as well, criticizing U.S. support for Israel.
In 1981, the late Iranian leader Ayatollah Ruhollah Khomeini declared the last Friday of the Islamic fasting month of Ramadan as "Al-Quds Day," a day of protest to show the importance of Jerusalem to Muslims. Jerusalem is the third holiest site in Islam after the Saudi Arabian cities of Mecca and Medina.
A banner in Tehran carried a quote from the late Iranian leader Ayatollah Ruhollah Khomeini: "Quds is part of Islam's body."
Protests were also planned in Egypt and Lebanon.
The frequent saber rattling by the Iranian president has raised growing concerns in Israel about Iran's nuclear program, reports CBS News correspondent Robert Berger. Prime Minister Ehud Olmert said this week that Iran would have to pay a price, hinting broadly that Israel might launch a pre-emptive strike against the nuclear facilities. Some analysts say the only way Israel could launch a successful strike against Iran's well-fortified facilities, is to use its own tactical nuclear weapons.
Iranians "have to be afraid" of the consequences of their intransigence," Olmert told reporters on his way home from Moscow. "They have to understand that if they object to every compromise, there will be a price to pay."
A draft U.N. resolution on Iran is expected to be introduced in the Security Council early next week, and diplomats have said they would seek limited sanctions on Tehran for refusing to suspend uranium enrichment — a key process that can produce either fuel for a nuclear reactor or the material for a warhead.
On Friday, Ahmadinejad called the U.N. Security Council and its decisions "illegitimate" as long as it was dominated by the U.S. and Britain.
"What sort of Security Council is this? The whole world knows that the U.S. and Britain are enemies of the Iranian nation," he said.
The United States and Britain — along with France, Russia and China — have power to veto any Security Council measures.
"The time is over for such logic. Under such circumstances, the Security Council is illegitimate and its decisions are illegitimate," Ahmadinejad said, drawing chants of "Death to America" from the crowd.
Ahmadinejad has said the Nazis' slaughter of 6 million Jews during World War II was a myth, and that Israel should be wiped off the map or moved to Germany or the United States.
He warned Friday that the U.S. and other supporters of Israel were accomplices in Israeli attacks against Palestinians.
"Any crime committed (by Israel) today, any house demolished ... it will be the direct responsibility of the supporters of this (Israeli) regime ... This regime has nothing for you but loss," he said.