the city took its name from the name of the tribe that moved to this area, the Caspian, later the name was Arabized and changed to the current form, Qazvin. Historical records mention that Shapur created Qazvin and named it Shad Shapur. The city and its surrounding area was under constant attack of aggressive tribes, Shapur builds a castle with strong fortification and use it as his army base to protect the city from the said tribes specially Daylamites that kept attacking the city and the caravans that pass through them. As time passes the fort grows and becomes the core of the Qazvin and a reason of its popularity. The security that Shapur gave the town, turned it into an important business and economic spot, the city became so popular that Safavid kings chose it as their capitals and later it became a model for Isfahan.