Earlier, amid nation-wide commemorations marking the 40th anniversary of the 1979 triumph of the Islamic Revolution, an Islamic Revolutionary Guard Corps (IRGC) commander told Iranian media that the country's military would "raze Tel Aviv and Haifa to the ground" if attacked by the US.
Demonstrators braved rain and snow on Monday, carrying Iranian flags and chanted slogans such as "Death to Israel, death to America".
Iran's army declared its neutrality on February 11, 1979 and paved the way for the collapse of Shah Mohammad Reza Pahlavi - the closest ally of the U.S. in the Middle East. President Hassan Rouhani said at a rally in the capital that Iran was determined to expand its military power.
"We have not asked and will never ask anyone for permission to increase our defence capabilities and to build all kinds of missiles, be they surface-to-air missiles, anti-ship missiles or ground-to-ground missiles", the Iranian leader said.
The state has played up this year´s anniversary as 40 is symbolic of maturity in the Islamic tradition and the age at which Prophet Mohammed received revelations from God.
Prices of bread, cooking oil and other staples have soared since President Donald Trump withdrew Washington from the 2015 nuclear deal a year ago and reimposed sanctions.
The large turnout in state-sponsored rallies came as Iranians face mounting economic hardships following the return of USA sanctions a year ago.
Iranian officials said the move amounted to "economic warfare".
May urges United Kingdom lawmakers: Give me more time to get Brexit deal
The accord follows a Swiss "Mind the Gap" strategy developed after British voters approved Brexit. European Union leaders have rejected any changes to the legally binding withdrawal agreement.
Israeli television reported last week that Israel has discovered a new ambitious precision missile factory being constructed by Iran in Syria together with the Syrian government and Lebanese terror group Hezbollah, after Israel bombed and destroyed a previous one.
"The Iranian people have and will have some economic difficulties [due to the sanctions] but we will overcome the problems by helping each other", Rouhani said in his address.
Israel says it has carried out hundreds of airstrikes on Iranian-linked targets as part of a campaign to prevent Tehran from establishing a military presence in Syria.
"We will not let America become victorious." he said.
Regional power Saudi Arabia and other Arab countries have viewed Iran with great suspicion since the Islamic Revolution swept the Shah from power, fearing Khomeini would inspire Islamic militants across the region.
Top political and military leaders in Iran regularly call for Israel's annihilation, with a senior general recently claiming it would defeat the Jewish state "within three days" in the case of a war.
Iranians march towards Azadi Square during Monday's rally. "I am not ignoring the threats of the Iranian regime, but nor I am impressed by them", he said.