|Hasan bin Sabbah (1034-1124) took possession of the fort of Alamut in Iran in 1090. His immediate concerns were to refortify Alamut, provide for it food and water supply, irrigate the field in the valley, acquire adjacent castles, erect forts at strategic points, institute economic and social reforms and unite the Ismailis by bonds of fraternity. Thus, he succeeded to establish the Nizarid Ismailis rule in Alamut. It appears from the fragments of the historical sources that, the Ismailis continued green colour as their standard, and Hasan bin Sabbah is reported to have hoisted it for the first time on the summit of the Alamut.|
Malik Shah (d. 1092), the Seljukid ruler in Iran became highly perturbed when he heard the foundation of the Alamut's rule, and hatched animosity with the Ismailis. Soon afterwards, Alamut came to be raided by the Seljukid forces, carrying their imperial banner contained black ground with the figure of a dragon or an eagle. The enemies of the Ismailis desired to hoist their banner on Alamut through military actions, but the Ismaili warriors warded off their attacks all the times and continued to hoist their banner on Alamut.
On August 8, 1164, Imam Hasan Ala Zikrihi's Salam (1162-1166) commemorated a historical occasion of qiyamat-i qubra in Alamut. According to "Jamiut Tawarikh" (compiled in 1310 A.D.), four large banners of four colours, white, red, yellow and green were set up at the four corners of the pulpit. "Haft Bab-i Baba Sayyid'na" (comp. in 1200 A.D.) writes that Hasan bin Sabbah had foretold the advent of qiyamat-i qubra, and said, "When the Imam appears, he will sacrifice a camel, and bring forth a red standard." It implies that the virtual penetration of red colour in the Ismaili tradition took place in the period of Alamut.
The Ismaili flag also reflected superiority and a peak of glory of the Alamut rule. In 1213, the mother of Imam Jalaluddin Hasan (1210-1221) went on the pilgrimage to Mecca under the patronage of the Abbasid Caliph Nasir (1180-1225), who received her with great pomp and deference. On that occasion, the Abbasid Caliph placed the flag of Khwarazamshah behind that of the Ismailis in the caravan of the pilgrims.