Palace of the Shirvanshahs
The residence of the rulers of Shirvan and the summit of the Shirvan architectural school — a whole stone world of courtyards, portals and mausoleums.

A palace complex
The Palace of the Shirvanshahs is not a single building but an ensemble of structures on the upper terrace of the Old City, formed mainly in the 15th century under Shirvanshah Khalilullah I. The buildings stand on different levels of the rocky slope, linked by courtyards and stairs. The ensemble is regarded as a jewel of the Shirvan-Absheron architectural school — with restrained pale stone and fine carving upon it.
What the ensemble includes

The Divankhana
The most enigmatic part of the complex is the Divankhana: an octagonal rotunda pavilion set within an arcaded courtyard, with a magnificent carved portal. Its purpose is not firmly established: a hall of justice or state council, a mausoleum, or a place of audiences have all been proposed. The portal's fine stone carving, with floral and geometric ornament and Arabic inscriptions, is one of the masterpieces of medieval Azerbaijani architecture.

Mausoleum and mosque
Below stand the palace mausoleum (türbe) with its portal and Arabic epitaphs, where members of the Shirvanshah's family were buried, and the palace mosque with its tall minaret. Building inscriptions survive on the stones; by them the mausoleum is dated to the 1430s. These structures, like the whole ensemble, lack lavish decoration — their expressiveness lies in their proportions, masonry and precise carving.

Mausoleum of Seyid Yahya Bakuvi
In the southern courtyard stands the octagonal mausoleum of Seyid Yahya Bakuvi — a 15th-century court scholar, astronomer and Sufi, sometimes called the "dervish's türbe." Nearby are the remains of the palace bath (hammam), partly sunk into the ground to retain heat. The complex's eastern portal, the so-called "Gate of Murad," was added later, in 1585, and bears the name of the Ottoman sultan.
The purpose of the Divankhana and some of the dating of the palace ensemble remain subjects of scholarly debate.