Akbar Hashemi Rafsanjani, a former Iranian president, has warned the West that its support for Israel will backfire.
As thousands of Iranians rallied on al-Quds (Jerusalem) Day, Rafsanjani said supporting Israel was dangerous and that the US, Britain and France will "put themselves in trouble".
The powerful politician warned supporters at the rally, which is held every year on the last Friday of Ramadan, that Israel could take "tougher and more offensive action" than the US against Iran and the Arab world.
Al-Quds Day was started by the late Ayatollah Ruhollah Khomeini as a way of expressing solidarity with the Palestinians and underscoring Jerusalem's importance to Muslims.
Hundreds of thousands of Iranians rallied in cities across the country to protest against Israel's occupation and annexation of East Jerusalem.
"Jerusalem is being destroyed and Judaized every day while Israeli flags fly in their capitals"
Ahmed Jibril, leader of the PFLP-GC
In the capital Tehran, demonstrators chanted "Death to America" and "Death to Israel", with some setting fire to US and Israeli flags.
State television reported similar large rallies in all other provincial capitals and smaller towns across the country.
Rallies were also held in Afghanistan, Pakistan and the besieged Gaza Strip to mark al-Quds Day.
In the Syrian capital of Damascus, more than 3,000 people gathered at the Yarmouk refugee camp carrying Palestinian flags and anti-Israeli banners.
The rally was attended by several officials from Syria-based Palestinian factions such as Ahmed Jibril, leader of the Popular Front for the Liberation of Palestine General-Command.
"This day is a day of popular anger in the Arab and Islamic nations. It is directed toward all those who are colluding against Palestine and Jerusalem," Jibril said.
"Jerusalem is being destroyed and Judaized every day while Israeli flags fly in their capitals."
Israel, meanwhile, imposed tighter security measures inside Jerusalem and the Old City on Friday.
Thousands of Israeli police were deployed in the vicinity of the al-Aqsa Compound, which houses the al-Aqsa mosque and the glittering Dome of the Rock, as well as crossings leading to it.
Thousands of Palestinians were expected to converge on the compound from other parts of the West Bank in an attempt to pray there.