Back to overview
Religious site · Shamakhi

Juma Mosque of Shamakhi: history, three halls, and how to visit

Shamakhi · about 1.5 to 2 hours from Baku

By Emin Abdulalimov

The Juma Mosque of Shamakhi is a working Friday mosque in northern Azerbaijan, founded in 743 to 744 AD under the Umayyads. It is the oldest mosque in Azerbaijan and the second oldest in the Caucasus, after Derbent. Its plan is unusual: three connected prayer halls with three mihrabs and three entrances. Wrecked by earthquakes in 1859 and 1902, the present building is a 2010 to 2013 reconstruction on the ancient footprint. Entry is free and there is no ticket office.

The domes and minaret of the Juma Mosque of Shamakhi
Photo: Diego Delso, CC BY-SA 4.0, via Wikimedia Commons
Fast facts
Region
Shamakhi
From Baku
120 km · about 1.5 to 2 hours
Best season
Spring to autumn
Time to spend
About 30 minutes
Entry
Free, checked 11 August 2026. A working congregational mosque rather than a ticketed museum: no gate, no ticket office, no online channel. Modest dress required, headscarf for women.
Hours
No authority publishes hours for this mosque. It is open daily as a working mosque, and visitor access pauses around the five daily prayers and around the Friday midday prayer. Checked 11 August 2026: there is no posted timetable to plan against.
What you see
  • Three connected prayer halls, each with its own mihrab and entrance, the mosque's signature plan
  • Rebuilt Shirvan-style domes and a tall minaret over old Shamakhi
  • An 8th-century foundation date that makes it the oldest mosque in Azerbaijan
  • Free entry with no ticket office, in a country where the state reserves went up to 15 AZN in January 2026
  • A quiet courtyard setting in the historic Shirvan capital, an easy stop on the road to Sheki

The Juma Mosque of Shamakhi is the oldest mosque in Azerbaijan, founded in 743 to 744 AD under the Umayyads, and it stands 120 km west of Baku in what was the capital of the medieval Shirvan state. Entry is free and there is no ticket office. Birtour has run the Shamakhi corridor as a Baku-based DMC since 2014. This page covers what actually stands on the site, the founding claim people get wrong, what the mosque costs and when you can realistically get in, and how it sits on one road with Diri Baba and Yeddi Gunbaz.

How old is the Juma Mosque of Shamakhi?

It was founded in 743 to 744 AD, during the Umayyad period, which makes it the oldest mosque in Azerbaijan. The building is nowhere near that old. Almost no 8th-century fabric survives above ground, and what you walk into is a reconstruction completed between 2010 and 2013 on the footprint the mosque has held for nearly thirteen centuries.

The foundation date is well attested. The patron is not, which is why we say "founded in the 740s under the Umayyads" on the coach rather than attaching a single name to it. The honest framing is that the site is 8th-century and the walls are recent, and a guest who hears that from the guide does not feel misled when they see the fresh stonework.

Is it the oldest mosque in the Caucasus?

No. It is the oldest in Azerbaijan and the second oldest in the Caucasus. The Juma Mosque of Derbent, in present-day Dagestan just north of the border, dates to 734 AD and beats Shamakhi by about a decade. Plenty of tourist copy hands Shamakhi the regional title anyway.

We correct that before anyone reads it on a sign. Being the oldest in the country is distinction enough, and a guide who oversells the first fact of the day loses the guest for the next six.

What is unusual about the building?

The plan. Three connected prayer halls, each with its own mihrab, the niche pointing toward Mecca, and each with its own entrance. That arrangement is rare in the Caucasus and is usually compared to the early Umayyad mosques of Damascus. Above it sit pointed Shirvan-style domes and a slim minaret over the old town.

The earthquakes of 1859 and 1902 flattened much of Shamakhi and took the mosque with them more than once. Every rebuild since has kept the three halls, which is the reason the plan is still legible in a building whose stone dates from this decade. Inside, the carpets run the full width of each hall and the mihrab in the central hall carries turquoise tilework and calligraphy panels. Half an hour covers it properly.

How much is entry, and when is it open?

Free. It is a working congregational mosque rather than a ticketed reserve, so there is no gate, no ticket office and nothing to book. No authority publishes opening hours either. It is open daily because it is in use, and visitor access pauses around the five daily prayers and around the Friday midday prayer.

We re-checked the tariff position across the whole corridor on 11 August 2026, and the contrast with the paid site down the road is the useful part:

Site on the Shamakhi roadEntry, checked 11 August 2026HoursTicket channel
Diri Baba Mausoleum, Maraza, 95 km from Baku15 AZN foreign adultDaily 09:00 to 19:00, no day offiTicket.az dated session, or the gate
Juma Mosque, Shamakhi, 120 km from BakuFreeNone publishedNone
Yeddi Gunbaz, 1.5 km south of ShamakhiFreeDaylight, no gateNone

One correction to carry with you: the 9 AZN figure for Diri Baba that still sits on most travel pages is out of date. The State Tourism Agency's Reserves Management Center raised foreign-adult entry at its sites from 9 to 15 AZN on 1 January 2026, and local prices did not move. Diri Baba is one of the five sites affected.

On the mosque's own hours we would rather admit the gap than fill it. Nobody publishes a timetable, so nothing you read online is a posted opening time, including anything you read here. Arrive late morning or mid-afternoon with slack in the plan and you will get in.

How do you get to Shamakhi from Baku?

Shamakhi is about 120 km west of Baku on the M4, roughly an hour and a half to two hours on good asphalt heading toward Sheki and Ganja. There is no useful rail link, so a car or a guided trip is the practical way in. The mosque stands in the old part of town.

The routing fact that matters is that all three Shamakhi-corridor sites sit on the same road, in order, with no detour between them. Diri Baba at Maraza comes first at 95 km, so it is 25 km short of Shamakhi rather than a diversion. The mosque is next. Yeddi Gunbaz is 1.5 km south of town, about ten minutes from the mosque door. Three stops, one road, and the same road carries on to Sheki if the day is a transfer rather than a return.

That is how we sequence it on our 6-day Azerbaijan cultural tour: Diri Baba on the run west, the mosque and Yeddi Gunbaz in Shamakhi, then the long pull to Sheki with the light behind you.

What else should you see in Shamakhi?

Two things, both short. Yeddi Gunbaz, the Seven Domes, is a hillside burial ground holding the tombs of the family of Mustafa Khan, the last ruler of the Shirvan Khanate; three of the seven domes still stand and entry is free. Above town sit the ruins of the medieval Gulistan fortress. The district is also wine country.

Those two plus the mosque make a genuine half-day rather than a photo stop, and they run in chronological order if you take the mosque first: 743, then the fortress, then the khans' tombs of 1810 and after. That sequence is the argument for stopping in Shamakhi at all, and it is worth saying out loud to a group before they get out of the vehicle.

Can you go inside, and what should you wear?

Yes. Visitors are welcome outside prayer times and nobody charges you. Women cover hair, shoulders and knees, and a light scarf does the job; men should skip shorts. Shoes come off before the carpets. Keep your voice down if anyone is at prayer, and ask before photographing a person rather than the room.

Friday midday is the exception. The congregation fills the halls and a tour group standing in the aisles is in the way. If your only window is Friday, come after the prayer has cleared or make the point of the visit the congregation rather than the architecture, and brief the group before they walk in.

What is the best time of day to visit?

Late morning or mid-afternoon, outside the prayer windows. For photographs, the last two hours before sunset are the ones worth having: the pale stone and the domes separate from the hillside behind, and the courtyard empties. Midday in July and August is the worst of both, hot and flat.

Shamakhi sits higher than Baku and runs several degrees cooler, which makes it a reasonable summer stop when the city is at 35 degrees. Spring and autumn are still the better windows. For operators sequencing the western run across a whole season rather than booking a single day, our month-by-month planner's calendar covers the same trade-offs on this road.

Is the Juma Mosque a UNESCO World Heritage Site?

No, and it is not on the tentative list either. Azerbaijan has four inscribed properties: the Walled City of Baku with the Shirvanshah's Palace and Maiden Tower (2000), the Gobustan Rock Art Cultural Landscape (2007), the Historic Centre of Sheki with the Khan's Palace (2019) and the Cultural Landscape of Khinalig People and the Koch Yolu route (2023). Shamakhi is on none of them.

That is not a knock on the place. World Heritage inscription rewards documented integrity of fabric, and a building whose walls went up between 2010 and 2013 was never going to clear that bar. The date on the site is what makes the stop worth making. The plaque was never the point.

Why does Shamakhi turn up on Japanese tour itineraries?

Baku Media Center, which handled filming permits and logistics for the second season of the TBS drama VIVANT, published eight filming regions in November 2025, and Shamakhi is one of them. That announcement names regions, not buildings. No source has tied a scene to this mosque.

Hankyu Travel's six-day Azerbaijan package, sold in Japan, stops in Shamakhi, and its published itinerary names the town rather than the Juma Mosque of Baku or the one in Sheki. Hankyu labels the mosque one of six filming locations, a designation its page carries on its own authority. Our VIVANT in Azerbaijan page sets out who has named which places, and on whose authority.

What we would not recommend

Three things. Do not build a day around the mosque on its own, because the visit is half an hour and the driving is four hours return. Do not arrive at Friday midday with a group of twelve unless you have decided the congregation is the point. And do not plan against an opening time you found online, because no authority publishes one.

On the first, the mosque is a stop rather than a destination, and a client sold a "Shamakhi day trip" built on this one building will feel short-changed on the drive home. Pair it with Diri Baba and Yeddi Gunbaz, or run it as the first half of a Sheki transfer.

On the last, the gap is real and we would rather name it than paper over it. Neither the State Tourism Agency's reserve network nor the Ministry of Culture lists this mosque, because it is not a managed reserve. It answers to the congregation, not to a ticketing system, and its access hours move with the prayer calendar rather than with a published schedule.

Gallery
Old black-and-white photograph of the domed Juma Mosque of Shamakhi above ruins
Photo: Yulian Zelinskiy, Public domain, via Wikimedia Commons
Stone facade of Juma Mosque of Shamakhi with central dome and minarets
Photo: Elnur Neciyev, CC BY-SA 4.0, via Wikimedia Commons
Tiled mihrab with turquoise arch and calligraphy panels inside Juma Mosque of Shamakhi
Photo: shankar s. from Dubai, united arab emirates, CC BY 2.0, via Wikimedia Commons
Frequently asked
How old is the Juma Mosque of Shamakhi?
It was founded in 743 to 744 AD, in the Umayyad period, which makes it the oldest mosque in Azerbaijan. The building you see today is not original, though. After earthquakes in 1859 and 1902 and a major rebuild finished in 2013, the present structure is a reconstruction on the ancient site.
Is it the oldest mosque in the Caucasus?
It is the oldest in Azerbaijan but the second oldest in the wider Caucasus. The Juma Mosque of Derbent, in present-day Russia, dates to 734 AD and predates it by about a decade. Shamakhi's mosque is still one of the region's earliest, founded only a few years later.
How much does it cost to visit the Juma Mosque of Shamakhi?
Nothing. It is a working congregational mosque, not a ticketed reserve, so there is no gate, no ticket office and nothing to book online. We re-checked that position on 11 August 2026. It is worth knowing because the paid site 25 km back down the same road, Diri Baba, went from 9 to 15 AZN for foreign adults on 1 January 2026.
What are the opening hours of the Juma Mosque of Shamakhi?
No authority publishes any. The mosque is open daily because it is in use, and visitor access pauses around the five daily prayers and around the Friday midday prayer. Plan a late morning or mid-afternoon arrival with some slack in it, rather than treating a time you read online as a posted opening hour.
Is the Juma Mosque of Shamakhi a UNESCO World Heritage Site?
No, and it is not on Azerbaijan's tentative list either. The country's inscribed properties are the Walled City of Baku (2000), the Gobustan Rock Art Cultural Landscape (2007), the Historic Centre of Sheki with the Khan's Palace (2019) and the Cultural Landscape of Khinalig People and the Koch Yolu route (2023). Shamakhi appears on none of them.
What else is there to see in Shamakhi?
Yeddi Gunbaz, the Seven Domes, is a hillside burial ground 1.5 km south of town holding the tombs of Mustafa Khan's family, the last khans of Shirvan; three of the seven domes survive and entry is free. Above town sit the ruins of the medieval Gulistan fortress. The district is also wine country. A half-day covers the lot.
How far is the Juma Mosque from Baku?
Shamakhi is about 120 km west of Baku on the M4, roughly a 1.5 to 2 hour drive on good asphalt toward Sheki and Ganja. There is no useful rail link, so most visitors arrive by car or on a guided trip. The mosque sits in the old part of town.
Can tourists go inside the mosque?
Yes. It is an active Friday mosque, free to enter, and visitors are welcome outside prayer times. Dress modestly: women cover their hair, shoulders and knees, and men avoid shorts. Remove your shoes before stepping onto the carpets, and keep noise down if people are praying.
Why does it have three prayer halls?
The three-hall plan is the mosque's defining feature and unusual for the region. Three connected prayer rooms each carry their own mihrab and entrance, an arrangement often compared to the early Umayyad mosques of Damascus. Successive rebuilds after earthquakes kept this original layout intact.
Tell us about your program

Send your brief to our Baku team.

Include your dates, party size and priorities. Choose the traveller or agency form to send the details relevant to your enquiry.

Email us directly