Qom is the second religious city of Iran and one of the bases of Shi'ism. The city dates back to before the rise of Islam. The city was conquered by Muslims in 23/644-645 but the people of Qom converted to Islam with the immigration of Ash'ariyyun in 85/704-705, the beginning of the development of Qom as a Shi'a city was from that time.