Look around first
What to notice
- The portal of the family tomb
- The minaret of the palace mosque
- The octagonal mausoleum of Bakuvi
- The foundation of the Kei Gubad Mosque
The story of the place
The octagonal mausoleum stands beside the foundation of a vanished mosque. It was in this mosque that Seyid Yahya Bakuvi prayed, taught, and turned the palace court into one of the main centers of the Khalwatiyya Sufi brotherhood, a community of prayer and seclusion.
Yahya was born in Shamakhi and studied under Sheikh Sadr al-Din, the head of the local Khalwatiyya community. Its members sought religious knowledge through prayer, study, and seclusion. After their teacher's death, the students had to choose a new leader. Later Sufi biographies say that Sadr al-Din appointed Yahya, but another student, Pirzade, took the position of head. For Yahya, this meant losing his school, his circle of followers, and the house where his teacher had lived. Pirzade remained to lead the community in Shamakhi, while Yahya left for Baku.
Here, the Shirvanshah Khalilullah I received him. The ruler settled Yahya at court, supported him, and helped establish a khanegah—a house where a Sufi teacher lived with his students, taught them, and trained his own successors. Khalilullah consulted him on questions of Sufism; Yahya dedicated one of his treatises to his patron.
The Kei Gubad Mosque, which stood beside the present mausoleum, served as the school. Here Yahya composed prayer rules, wrote treatises, and sent trained students to other cities. Through their work, the Khalwatiyya acquired a stable doctrine and a line of teachers. Yahya's students and the following generation carried his practice to Anatolia, then to the Balkans and Egypt. The brotherhood, whose major school was based at the Baku palace, became one of the most widespread Sufi movements in the Islamic world.
After his death, Yahya was buried near the place where he taught. Beneath the octagonal building is a crypt, and the upper chamber was intended for memorial rites. There is no construction inscription on the mausoleum, so the identity of the person buried there has been established from written evidence and a centuries-old tradition. The epithet Bakuvi means “from Baku”: a man born in Shamakhi entered history under the name of the city where he created his school and was buried.
The Kei Gubad Mosque burned down in nineteen eighteen. Of the chamber where Yahya worked, only the foundation remains; his grave was preserved by the mausoleum attached to the mosque.
The name of Yahya's patron is carved on the minaret of another mosque—the palace mosque. The inscription states that Khalilullah ordered the minaret built in fourteen forty-one or forty-two. Inside were a large men's prayer hall and a smaller women's prayer hall: the ruler, his family, and the court prayed here.
Nearby, Khalilullah established a family tomb. He ordered its portal to state that the tomb was built for his mother and son in fourteen thirty-five or thirty-six. Beneath the floor, archaeologists found the burials of an elderly woman and a child aged six to seven. Researchers tentatively associate them with the ruler's mother, Bika Khanum, and his seven-year-old son, Farrukh Yamin. Later, other relatives were buried here as well: four of Khalilullah's five sons died before their father.
Of Yahya's school, the foundation is now visible; above his crypt stands the octagonal mausoleum, and the name of the man who gave him shelter survives on the portal of the family tomb and on the minaret of the palace mosque.
Useful on site
As part of the Palace of the Shirvanshahs, daily 10:00–19:00.
Checked: date not specified. Check the official source before visiting.Explore the complex in sequence and keep quiet: this is not only a museum section of the palace, but also a burial space. Do not step on the marked archaeological remains.
