During the Safavid period, Iran was sandwiched between neighboring Sunni countries. Ottoman Turks, the most powerful of them all, were always threatening the boundaries of the Safavid Empire and a slight mistake meant losing the country. So, Safavid kings decided to establish Shiism as the dominant religion in Iran. As a result of these piolitical changes, a large number of Shiite scholars and faqihs migrated from Bahrain and Lebanon to Iran. Sheikh Lotfollah was one of these doctors of religion who came from Lebanon to Iran. First, he lodged in Mashhad but when Uzbecks attacked Mashhad, he moved to teach in Qazvin.
After a while, Shah Abbas invited Sheikh Lotfollah to Isfahan, married his daughter and built him a school and mosque in Naghsh-e Jahan Square, where he occupied the position of the Imam of the mosque and a teacher of religious matters until he died in 1623.