For months before the last shah fled Iran ending 2,500 years of royal rule, shopkeeper Ahmad Sheikh-Mehdi witnessed the fervour sweeping his country, heralding the arrival of the Islamic revolution.
Forty years ago, Mohammad Reza Pahlavi, who had dubbed himself the "King of Kings", flew out of Iran on January 16, 1979 after mass uprisings across the country.
His departure paved the way for the triumphant return on February 1, 1979 of Ayatollah Ruhollah Khomeini from exile in France, and was ultimately to usher in the Islamic Republic.
"Everyone was transformed by the revolution. We felt hopeful," said Sheikh-Mehdi, who at the time was a shopkeeper's assistant in Tehran's Grand Bazaar.
The bazaar was one of the hotbeds of support for the revolutionaries, a bastion of tradition closely allied to the clerics who opposed what they saw as the shah's Westernising and secularising project.
Sheikh-Mehdi remembers that time vividly, but what sticks most in his mind is the dervish - an Islamic mystic - who strode the bazaar's long corridors in the months before the shah fled, repeatedly chanting what amounted to a prophecy.
"Nothing will be good until we are good. Before long, the tables will turn on this age," Sheikh-Mehdi, now 76, recited. "And the tables did turn," he added.
The shah and his wife flew to Egypt, beginning 18 months of wanderings which led them as far as the United States and Mexico before Pahlavi wound up back in Cairo where he died from cancer on July 27, 1980 at the age of 60.
The shah's power had begun to crumble before he left the country, when in January 1978 Etelat daily newspaper was ordered to publish an article seen as insulting to Khomeini.
Demonstrations by theology students were violently crushed and the funerals of the victims sparked a cycle of fresh protests and repression.
Unrest mounted through 1978 and the bazaar frequently shut down in support of the protesters. "A young man would run into the bazaar, let out a sharp whistle and shout 'They're here!', and we'd all close shop and go join the protests," remembered 77-year old Ebrahim Almasi, who still runs a suit stall. He misses that burning revolutionary spirit, inspired by Khomeini's charisma.
"People had passion back then. Blood was flowing," he said.
Sheikh-Mehdi recalled how he would buy eggs for striking workers, part of the widespread solidarity felt at the time.
"People would come and ask if we were short and give us money... We helped people as much as we could," he said.
Educated in Switzerland, Pahlavi ascended the throne on September 16, 1941 at the tender age of 21.
The insecure young king did not gain real authority until 1953 when a CIA-backed coup removed his highly popular prime minister, Mohammad Mossadegh, who was trying to nationalise the country's oil. Flush with the country's petro-dollars, the shah became one of the best customers of the US defence industry and a bulwark against Soviet influence.
But his Western-inspired reforms triggered tumultuous social change that angered the clergy, while his consolidation of power and brutal secret police earned him a reputation as a tyrant.
Opposition to the shah and the aura of corruption around the Tehrani elite brought together an unlikely but powerful coalition of radical Islamists, who opposed the quietism of the traditional clergy, and left-wing students motivated by anti-colonial movements around the world. The 40th anniversary of the shah's departure comes at a difficult time for Iran and Tehran's iconic bazaar as renewed US sanctions and poor management have plunged the country's economy into recession. Sheikh-Mehdi said this was precisely the time to return to the religious roots of the revolution. He still draws inspiration from Hazrat Imam Ali (RA), son-in-law to holy Prophet Mohammad (PBUH) and a symbol of justice for Shia Muslims. "We all need to remember life is short, and we will be judged," he said.