President Hassan Rouhani said Iran was determined to expand its military power and ballistic missile programme despite mounting pressure from hostile countries to curb Iran's defensive work, state TV reported.
"We have not asked and will not ask for permission to develop different types of ... missiles and will continue our path and our military power," Rouhani said in a speech at Tehran's Azadi (Freedom) square, where tens of thousands gathered to mark the anniversary.
The large turnout in state-sponsored rallies came as Iranians face rising prices, food shortages and high inflation that have triggered waves of protests.
U.S. President Donald Trump pulled out of Iran's 2015 nuclear deal with world powers last year and re-imposed sanctions on Tehran, dealing a blow to the country's economy. Iranian officials said the move amounted to "economic warfare"
Soldiers, students, clerics and black-clad women holding small children, flocked to the streets of cities and towns, many carrying portraits of Khomeini and Iran's current Supreme Leader Ayatollah Ali Khamenei.
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.
Iran and Saudi Arabia are locked in proxy wars in Iraq, Yemen and Syria.