Large libraries existed in Iran both before and after the advent of Islam and throughout many periods in Iran's history. One can mention the libraries at Gondeshapur, School of Nisibis, and Sarouyeh during the pre-Islamic era of Iran.
During the Middle Ages, many schools of Nizamiyya harbored large collections of manuscripts and treatises. In Maragheh, Nasīr al-Dīn al-Tūsī built a library that reportedly contained some 40,000 volumes which was well financed. And the royal library of the Samanid court in which Avicenna was granted special access to, is yet another fine example.
The first prototype of a modern national library in Iran was the Library of Dar al-Funun College established in 1851. In 1899 another library called the Nation's Library was inaugurated in Tehran. Finally, the National Library of Iran was inaugurated in 1937.
Iran's major national libraries today are:
National Library of Iran, Tehran
Central Library of Astan Quds Razavi, Mashad
Tabriz National Library, Tabriz
Malek National Library, Tehran
Ayatollah Marashi Najafi Library, Qom
Iran's Library of The Parliament
Shiraz Regional Library of Science and Technology, Shiraz
Library of Institute for Studies in Theoretical Physics and Mathematics