Şamaxı is a city in and the capital of the Shamakhi Rayon of Azerbaijan. The city has a rich heritage and has provided the backdrop to major political events throughout much of its two millennia of existence. The city's estimated population as of 2010 was 31,704. It is famous for its traditional dancers, the Shamakhi Dancers, and also for perhaps giving its name to the Soumak rugs.
In its history eleven major earthquakes have rocked Shamakhi, but through multiple reconstructions it maintained its role as the economic and administrative capital of Shirvan and one of the key towns on the Silk Road. The only building to have survived eight of the eleven earthquakes is the landmark Juma Mosque of Shamakhi, built in the 10th century.