Barely 2 km across the valley from Shamakha and with an excellent view back onto the city are the famous Yeddi Gumbaz (seven tombs in Azeri), Usseinov et al suggest that seven purely meant 'many'. In fact only three of these desecrated octagonal royal tombs remain reasonably complete. They are the 18th-/early 19th-century mausolea of the khans of Shamakha. The last khan, Mustafa, had fled to his palace at Fitdag/Sulut to avoid the advancing Russians, but was finally buried here along with his ancestors. Some of the surrounding gravestones are much more ancient - as much as a millennium old.