Qazvin in the ancient writings of Europe have called old city "Arsas" or "Arsasia" and in the greek histories "Razhya" and in the era of Ashkanian on the of its founder "Ardia".
Sasanian have called it " kashvin" , it means the land that shouldn't lose sight of it, some people called it "Qasvin" or the city where people are strong and firm and some historians called it "kaspian" , because kapest tribe were migrated from the vicinity of Mazandaran sea to this plain and were mixing with the native tribes and others have gone to the Iran's center and for this reason Khazar sea is known to Bahr Al-Qazvin or Qazvin sea.
In Qazvin one hundreds old hills have been identified that each one has a golden leave of Islamic history and civilization of our country and just excavation of Segezabad hill indicates 9 thousands years sedentary civilization in this fertile plain.
Ahmad Ibn Abi Abdellah Barqi in "Alnabian" book and Khaje Hamdollah Mostoufi in " Tarikhe Gozide" and Mohammad Hassankhan E'temadolsaltane in " Mer'at Albadan" book and Amin Ahmad Razi in " Haft Eqlim" and by the birth of Russian renowned orientalist in " Iran historic Geography" book , Qazvin building has been attributed to first Shapur.
Shams Al-din Sami Beik in"Qamus Al-e'lam Torki" had doubt about it and has written that Iranian Shapur Zolektefaf along with one of the Bahrams have founded Qazvin. The main source of the quote is "Akhbar Al-badan" Ibn Faqih and other "Albonyan" Ahmad Ibn Abi Abdellah Barqi that previous authors generally have cited by these two sources. It can not be definite idea about this, but by studying the situation of commandaring the two kings, we see that Shapoor Zolektefaf couldnot be effective in the country works because of minor age, then across the country was subject to slaughter and plunder of foreign and domestic tribes.
So it is better to know " Ibn Faqih Shapur Zoleketefaf" as Qazvin founder, but Ibn Faqih has mentioned that Shapur Zolektefaf has been founded it and has called Shad Shapur.others has had a description in this field, including Hamdollahe Mostoufi in "selcted history " has written Qazvin city was built by Shapur Ibn Ardeshir Babakan and called it Shadshapur.It also has been built in Qazvin, in the way that Chand river on the south and Abhar river on the north.
Mohammad Hassan khan E'temado Al-saltaneh in "Mer'at Al- baladan" book quote of Albonyan book, said Qazvin was built by Shapur Ibn Ardeshir Babakan and called Shadshapur and it was built between Kharrud and Abharrud rivers .
According to historical documents, the age of Qazvin ragion related to Median era, ninth century BC. At that time, mountainous part of Qazvin south and south west was regarded as Median territory which was invaded by different nations, include Ashur and Kasiha nations.
The study of obtained effects of Qazvin south in Boyin Zahra show that this region was habitat of human communities, on the fourth and fifth Millennium BC.
Original building of Qazvin is attributed to Shapur Zolektefaf. Shapur founded Qazvin in order to avoid of Dialame invading and made forts and defenses and placed his armies there. Over time Shapur Military base was developed and the kernel of Qazvin created. The city's location was very important as a passageway of Tabarestan and Mazandaran(Khazar) sea. After Arab's attacks to Iran and the beginning of Islamic conquests era, Bara Ibn Azeb,Arab's famous commander , surrounded Qazvin. In Islamic era Qazvin Changed into a base of the next operations of Arab's armies. In 192Hq " Haron Al-Rashid" came in Qazvin and developed city and built Jame mosque.
Naser Khosro Qobadiani in his travelogue in 438Hq has been described Qazvin:
…there were plenty of gardens, without any wall and barrier for enter into there and I saw Qazvin as a pleasant city with good Bazaara but the water was little and the head of city was an Alavi man.
From the end of fifth century until the attack of Holaku to Sma'ilian castles,Qazvin was affected by the events that were related to Sma'ilian movements include, Hassan Sabbah and his deputies, it was the place of long-time wars between central government and Sma'ilian.
In Safavid era and during Shah Tahmasb kingship, by choosing Qazvin as a capital, it was further validated and several buildings and monuments were erected there.
In Qajarie era which Tehran was choosen as a capital, Qazvin because of being on the way of Tehran road to Europe and Russia, it had considerable importance.
By the beginning of Mashrutiat movement, Qazvin was the second place of revolutionaries and the people help to revolutionaries very much.
At the end of Qajar era "Rezakhan Mirpanj" met with British delegate on Qazvin Grand hotel that through that 22 Feb coup formed for extermination of Qajarie government.
Qazvin after Islam
Qazvin was recognized as Muslims border in following it's conquest in 21 Hq .
It's obvious that old and little Qazvin hadnot enough capacity for immigrants and Mujahid which it's expansion was necessary to attract Muslims to Qazvin. Sa'id Ibn Al-'as Ibn Omayyeh was Kufe's commander by Qsman who came in Qazvin to fight with Deilamian and made Qazvin a Prosperous and stable city.
Housing out of old castle, apparently was done by Mohammad Ibn Sanan Ajali in 90 Hq and others imitated him and built house out of the city and extended city