 Their attention shifted to Baku in the 12th century, when Shirvanshah Manuchehr III ordered that the city be surrounded with walls.In 1191, after a devastating earthquake destroyed the capital city of Shamakhi, the residence of the Shirvanshahs was moved to Baku, and the foundation of the Shirvanshah complex was laid.This complex, built on the highest point of Ichari Shahar, remains as one of the most striking monuments of medieval architecture in Azerbaijan.