During the 6th-century AH, under Seljūq rule, Rayy was a center of learning, attracting many Ḥanafīs as well as Shāfiʿīs, Zaydīs, Imāmīs, and Muʿtazilīs from other regions. Nevertheless, because of the conflicts during that period between Ḥanafīs and Shāfiʿīs, as well as between Shīʿīs and Sunnis, and then the Mongol invasion, only a handful of sources survive describing the activities of the Sunni scholars of Rayy and their relationships with one another and also with the Zaydīs and the Imāmīs. Contrary to expectation, some of the most valuable sources on the Sunnis of this era are writings by Shīʿī authors, one of the most important of which is the Kitāb al-Naqḍ by ʿAbd al-Jalīl al-Qazwīnī al-Rāzī. What emerges from these sources is a portrait of a city in which Zaydīs, Imāmīs, Ḥanafīs, and Shāfiʿīs lived together, albeit in separate quarters of the city, and while their coexistence sometimes erupted into bloody conflict, at the same time their scholars engaged with one another in theological debate, learning, collecting Hadith, and taking part in various rites, including the commemoration of ʿĀshūrāʾ, as described by Qazwinī. [ABSTRACT FROM AUTHOR]