The successive uprisings of the inhabitants of Qom, mated each time, were repeated until the coming to power of Bouyides, who were Iranian Shiites from Lahijan.

The successive uprisings of the inhabitants of Qom, mated each time, were repeated until the coming to power of Bouyides, who were Iranian Shiites from Lahijan (city located in the province of Guilan). The Bouyides gave importance to the city of Qom and promoted the development of this city. It was at the time of the Bouyides that Tarikh-e Qom, which is the first book on the history of Qom, was written.

The inhabitants of Qom remained Shiite during the following centuries. At the time of the Seljuks (in the fifth and sixth centuries of the Hegira) the inhabitants of Qom became very active on the political scene and obtained important state functions.

Qom was completely destroyed during the attack of the Mongols, then Mongol rulers converted to Islam attempted to rebuild the city, which was attacked again and its inhabitants massacred a century and a half later by Tamerlane. Hegira 8th century historians mention that the inhabitants of Qom are fanatical Twelver Shiites. In 909 of the Hegira, the army of the Safavid king Ismail I conquered the city of Qom. The Safavids paid particular attention to this city, which became an important and dynamic center of Shiism. During the attack of the Afghan tribes (at the end of the Safavid reign) Qom, which became a garrison town of the Afghan army, again suffered major damage. King Fath-Ali Shah Qadjar rehabilitated the important buildings of Qom, especially the mausoleum of Hazrat-e Ma'soumeh, sister of Imam Reza. After the 1979 Revolution, the importance of Qom increased as a teaching center for Shiism.


Qom, place of teaching of Twelver Shiism since the second century of the Hegira

Qom is a teaching center of Shiism since Imam Ja'far Sadeq. Many Hadith scholars in the 2nd and 3rd centuries of the Hegira were native to Qom or lived there. It was in the middle of the second century of the Hegira that the Shiite school of theology of Qom, by its importance, preceded the school of Kufa.

The installation of Imam Reza in Iran in the year 200 AH, and the burial of Hazrat-e Ma'soumeh, his sister, in Qom a year later, made this city a center of teaching of Shiism.

During the fifth and sixth centuries of the Hegira (in the Seljuk period), Qom was an important center of teaching Shia theology, with schools with sufficient means, teachers and exegetes of quality and libraries filled with books about different religious orders. At the time of the Safavids, Twelver Shiism became a state religion in Iran. The schools of theology of Qom were active and famous theologians such as Molla Sadra, Molla Mohsen Feyz, Allameh Lahiji, Sheikh Baha'i taught there. School buildings were restored and new buildings were built.

It can be said that the Howzeh Elmieh of Qom (name attributed to the institution responsible for teaching Shiism and its various principles in Qom) dates from the Safavid era. Ayatollah 'Abdolkarim Hairi, who lived in Qom at the time of the Qadjars, gave a more coherent structure to the teachings. Then, with the efforts of Ayatollah Boroujerdi, the activities of the Howzeh Elmieh took off, and the schools, libraries, and publications concerning the various branches of Islamic theology became very active. After the 1979 Revolution, the activities of the Howzeh Elmieh entered a new phase and took off. Currently, more than 40,000 students of theology (Iranian and foreign) reside in Qom and the theology schools of this city are equipped with the most modern technological means. The main objective of Howzeh Elmieh is to teach students the different fields Islamic theology and law, based mainly on the teachings of Imam Ja'far Sadeq, and to promote their dissemination in the world. The Howzeh Elmieh also has dozens of research centers. The theological schools that currently exist in Qom are all under the auspices of Howzeh Elmieh. Some of them are very old, others were recently built. Among the oldest, Madresseh Razavieh. It seems that Imam Reza lived there for a few days on his journey to Khorasan. The Madresseh Jahanguir Khan (also called Madresseh Nasseri) dates from the Safavid era. Many famous theologians have studied there. The Madresseh Ghiassieh is what remains of a famous and great school of the 8th century AH, which, according to another version, was built by order of the vizier of the Sultan Seljuk Sanjar in 547 AH. Madresseh Feyzieh is among the most famous theology schools in the world. This school replaced Madresseh Astaneh at the beginning of the 13th century of the Hegira. It was built around the middle of the 6th century AH and was restored under the Safavids. Gholam-Hossein Feyz Kashani, a great mystic, studied theology there, and this is why this school was called Feyzieh. The schools built in recent decades are the Madresseh Hojjatieh, built in 1987, which is one of the largest schools of theology in Qom (currently dedicated to non-Iranian students) and Madresseh Ma'soumieh, built in 1981 and used since 1988.