Around 4000 buses, requisitioned by the authorities, brought the marchers into the centre of the capital where they approached the square from seven points, said the state television service.
Similar gatherings were taking place in all the main cities of the country in response to calls in the official media, headed by supreme leader Ayat Allah Ali Khamenei.
Addressing the crowd, Iranian President Muhammad Khatami said, "Iranians are faced with three choices. The first is imitating the West and not taking into account the religious beliefs, culture and identity of Iranians".
"The second choice is the path of extremism, which does not take into account the need of our time, the demands or votes of the people."
Exponents of extremism, he said, "oppose freedom and democracy in the name of religion. Their model is a detestable and violent one we have seen in recent years in Afghanistan" under the Taliban regime.
"The third choice, which I believe in, is the path of the Islamic republic and of reforms."
But the president also appeared to imply he would not follow a number of his allies in parliament by resigning.
"I am nothing but a small servant who still has several months to finish his mandate. If I succeed or not... I know no other path than that of reforms."
Khatami said he was but 'a small
servant' and would not resign
Khatami's second and final mandate as president ends in mid-2005.
Supreme leader Khamenei, from whom conservatives take their cue, last week ordered the elections to go ahead despite protests by reformists loyal to Khatami over what they see as a rigging of the vote by the Guardians Council, a powerful and unelected conservative-run vetting body.
The events of February 1979 shocked the world as Iran came close to civil war.
There was widespread civil unrest as supporters of opposition leader Ayat Allah Ruh Allah Musavi Khomeini staged protests against the rule of Muhammad Reza Shah, Iran's self-proclaimed king.
The protests, which were led by anti-American clerics and fuelled by messages from the exiled Khomeini, called for the Shah's abdication.
The late Ayat Allah Khomeini
declared Iran an Islamic republic
On 16 January 1979, the Shah left Iran - opening the way for the Ayat Allah to return from exile to popular acclaim on 1 February.
Ten days later, the Shah's appointed prime minister went into hiding and Khomeini and his supporters seized power.
The Ayat Allah went on to declare an Islamic republic and himself as supreme leader.
Iranian expert David Claridge, from the London-based Risk Advisory Group, says the revolution changed the politics of the Middle East and led the way in challenges to western influence in the region.
Conservatives have thwarted attempts by reformist President Khatami to liberalise Iran's political system.
Reformist MPs have been barred
from running in the elections
Conflict between the two groups has led to a series of recent political stand-offs and some violence.
Most recently, the government threatened to resign over the disqualification of reformist candidates from the upcoming parliamentary elections.
The poll is likely to prove another flashpoint between the two camps and Claridge suggested there would be further challenges in the future to the Islamic republic by a youthful population increasingly interested in western culture.