The township of Qaem Shahr is located to the west of Sary and to its northern limits is the Caspian Sea. (Originally known as Aliyabad, the name Shaahi (Shāhi) was used until the Iranian Revolution in 1979 when the city acquired its current name.)
Qaem Shahr is situated in a lush green plain and in past was known as Ali Abad. Ali Abad was a village having a mausoleum which drew pilgrims to this area. This vicinity also has a palace from the times of Shah Abbas. But with the passage of time, other villages amalgamating to the village of Ali Abad, and gradually grew into a city. In the year 1935 it was called Shahi, and since then has become an industrial city. It is said that this city is related to the Espahbodan period.