Shamakhi
The old Shirvan capital in the hills west of Baku, with a mosque founded in the eighth century and an observatory above the town.
Updated 18 October 2026
Shamakhi was the capital of the Shirvanshahs for centuries and was destroyed by earthquakes repeatedly, which is why an old capital has so little old fabric. The Juma Mosque claims a foundation in 743, making it among the oldest in the Caucasus, though what stands is a modern rebuilding on the ancient plan after the last collapse. Above the town on the Pirqulu ridge is the Shamakhi Astrophysical Observatory, and the surrounding hills are the country's main wine district.
History
Ptolemy first named the town as Kamachia in the 1st or 2nd century AD, and from the 8th to the 15th century it was a capital of the Shirvanshahs, trading with India, China and Central Asia, as Chinese porcelain, copper coins and caravanserais found here show; eleven great earthquakes have struck it, and its Juma Mosque of the 8th century has survived eight. William of Rubruck passed through on his way back from the Mongol court, in 1476 the Venetian envoy Giosafat Barbaro described a good city of four to five thousand houses making silk and cotton, and in 1500-1501 it fell to the Safavids (Wikipedia, Shamakhi).
What's there
- The Juma Mosque - founded in 743 and rebuilt after repeated earthquakes, on the original three-hall plan.
- The Yeddi Gumbaz - seven domed tombs of the Shirvan khans on a hillside above the town.
- The observatory - the astrophysical observatory on the Pirqulu ridge, visited by arrangement.
- The vineyards - the surrounding hills, the centre of Azerbaijani wine production.
When to go
April to October is comfortable, with the grape harvest in September and October. The hills are cooler than Baku through the summer, which is why the road is busy at weekends. Winter brings snow to the ridge.
Practical notes
Very little genuinely old survives, and visitors expecting a historic capital will find a modern town. The mosque is a reconstruction, however ancient the foundation. The observatory needs arranging in advance and is not a walk-in.
Nearby
The Diri Baba mausoleum is at Maraza on the road back to Baku, and Lahij is north in the mountains.
Key facts
Source: Wikidata, item Q388224, read on 18 October 2026.
What to pack for Shamakhi
Chosen from what this place is for. Tap a kit for the full checklist.
- Spare batteries + cards - Cold and long shoots drain power; never run out at the good light. Find on Amazon
- Warm base layers - Merino or synthetic against the skin - never cotton, which chills when damp. Find on Amazon
- Comfortable walking shoes - Sightseeing means kilometres of pavement and cobbles daily. Find on Amazon
- Modest clothing - Shoulders and knees covered - the single most common requirement. Find on Amazon
Some links on this page are Amazon affiliate links - if you buy through them we may earn a small commission at no extra cost to you.
All packing kitsPlan your trip
Where to start if Shamakhi is going on the list.
Booking links on this page are affiliate links - if you book through them we may earn a small commission at no extra cost to you. It never changes what we write about a place.
Opening times, ticket prices and seasonal closures change - check the official source before you go: official site.



