the front of the lower courtyard, there is a mosque building with a minaret. In terms of the mosque is rectangular, has a large hall, a small women's chapel and service rooms. The northern portal is facing the Shirvanshahs burial vault. This portal is more solemn than the east, which was intended for the inhabitants of the palace, descending the semi-underground passage. The double-lighted hall is covered with a dome on spherical sails. Mihrab mosque is located at the southern end of the hall. Above the one-woman women's chapel there is also a domed room. It is inferior in size to the dome of the hall and repeats its outlines. Against the backdrop of the prismatic volume, completed by two domes with slightly pointed tunnels, a deeply shaded aperture of the mosque portal is clearly drawn. Above the northeast corner of the mosque stands a minaret, ending with a stalactite cornice supporting a balcony that had a stone barrier before. The inscription encircles the minaret below the stalactite cornice. It is executed in the font "nash" and contains an inscription. The inscription tells about the construction of the minaret, but not the mosque that was built at an earlier time. This is confirmed by the lack of a decorated rich portal and artistic inscriptions on it. The Eastern Portal On the territory of the southern courtyard of the complex was the so-called Eastern Portal, also known as the "Gate of Murad". The construction of this portal completed the formation of the ensemble. Judging by the inscription on the portal niche, the portal was built during the years of occupation of Baku by Ottoman troops at the behest of a noble Bakrada of the Rajab Baba in 994 AH (1585/86) by architect Amir Shah of Vaillankoukh (suburb of Tabriz). Compared with the Divan-khana portals and the Shirvanshahs burial vault, the structure and forms of the portal are somewhat simplified. It has a less rich and elegant decor. The upper part of the portal is decorated with a building inscription in Arabic. The inscription has sockets with floral ornaments on both sides. In the lower part of the portal, there is a deep niche formed by a stalactite semi-double. Unlike other portals of the palace, the Eastern portal has a wide lancet entrance opening, similar to the gate. Sarah Ashurbeyli assumes that this structure was the entrance to a building that did