The ShirvanShah's Palace was the most prominent architectural complex in the medieval city. After the earthquake the capital moved from Shemakha to Baku and the shah built this palace. The palace is a two storey building with service rooms on the ground floor. Built in the 15th century by Halilullah I, the palace remained untouched for a hundred years. In the complex you can see the 14th century Bei-Kubad Madrassa Mosque.