"We congratulate the Turkish people for this important Islamic success," Ali Akbar Velayati, adviser to Leader of the Islamic Revolution Ayatollah Seyyed Ali Khamenei on international affairs, told Iranian state television on Sunday.
The Hagia Sophia was constructed in the 6th century AD as a cathedral, during the Byzantine Empire, but was converted into a mosque after the Ottoman conquest of Istanbul in 1453.
In 1934, Turkey’s cabinet declared it a museum.
On July 10, Turkey's President Recep Tayyip Erdogan announced that the Hagia Sophia would be handed over to the country's religious affairs directorate and reopened for Muslim worshiping, shortly after a top Turkish court revoked the UNESCO World Heritage site's status as a museum.
Velayati also decried US Secretary of State Mike Pompeo’s recent remarks in which he called on Ankara to maintain the Hagia Sophia’s status as a museum.
"His ancestors converted all museums of the world into churches. The Hagia Sophia, which has been a mosque for 500 years, will remain as a mosque until the apocalypse," Velayati said.
On July 24, Friday prayers were held in the iconic site, now officially known as the Great Mosque of Ayasofya, for the first time in nearly nine decades.
Turkish authorities say the mosque, which is one of Turkey's top tourism destinations, will be open to all visitors outside prayer time.