 By 1090 AD, the Seljuk vizier Nizam al-Mulk had already given orders for Hassan's arrest and therefore Hassan was living in hiding in the northern town of Qazvin, approximately 60 km from the Alamut Castle.There, he made plans for the capture of the fortress, which was surrounded by a fertile valley whose inhabitants were mainly fellow Shi’i Muslims, the support of whom Hassan could easily gather for the revolt against the Seljuks.The castle had never before been captured by military means and thus Hassan planned meticulously.