 The prominent Azerbaijani historian, Abbasqulu Agha Bakikhanov, suggested the idea of the Mashtaga toponym "massaget" in the "Gulustan Ilam".Another meaning of this place was also given to Abbasgulu Agha Bakikhanov as "Mashadi Agha" in "Gulistani-Iram".Baku khanate Mirza Muhammad khan once built a magnificent castle here.