the time of the rule of the Ottoman Empire in the palace area, the gate in the palace wall surrounding the palace from the east has been preserved. From the inscription placed on the portal of this gate, it follows that they were built during the reign of the Turkish sultan Murad III (1574–1595 years of rule). Due to the literary works, there were Turkish pashas living in the palace at that time. The East Gate is a witness of this. Since the 17th century, the palace was empty, and there were not any government officials. The abbot of the monastery and the representative of the Isfahan mission Capuchin Pater Raphael du Mans in his essay in 1660 described Shirvanshah Palace in Baku fortress and gave information about its desolation and destruction. In 1723, Baku was besieged by the troops of Peter I, and the city was bombed. In this regard, the south-eastern facades of the palace suffered much. The palace was transferred to the Russian military department in the middle of the 19th century. The Russian military department made a partial renovation of the palace. At the same time, the significant restructuring was carried out, which adapted the palace facilities to warehouses for military equipment. Repairs carried out by the military department, along with the restoration of the destroyed parts, and led to the destruction of a number of parts required for the restoration of the palace. By adapting the building of the palace to the warehouse, the military department demolished a number of walls separating the rooms in the second and first floors, and there were semi-circular arches supporting the roof instead of them on the second floor. The remains of domed, lancet and cross-slabs were destroyed in all the rooms on the second floor; they were replaced by flat beams. And window openings (double-glazed windows) of the second floor were laid out so that only small windows remained. New wide doorways were pierced. During this period, the Eastern Orthodox Church in Baku sought the demolition of the palace to build a Baku cathedral in its place. However, this petition was rejected by the tsarist authorities only because the premises of the palace were used for large warehouses. There was an entrance made to the second floor of the northern facade of the palace and a huge opening was punched in the wall. This was done so that