the Archeology of the Caucasus" (Moscow, 1893) Historian Abbasgulu Bakikhanov wrote that Bakuvi taught and prayed in the mosque: "The cell where he prayed, the school where he worked and his grave are there, in the mosque". Keygubad Shirvanshah ruled from 1317 to 1343 and was Sheikh Ibrahim's grandfather. In the 1920s, when E. A Pakhomov surveyed the mausoleum and ruins of the old mosque, it was discovered that the pedestal on which the base of one of the mosque columns stood, covers a narrow trench made in the ground and plastered into the crypt of the mausoleum. In this trench, there were several stone tombstones. When examining the crypt, it was found that there were scattered bones to twenty human skeletons. The bones were folded without observing any rules. This is due to the fact that at the place where the mausoleum stood and around it, there was once a cemetery. And during the construction of the mosque and digging foundation pits under the foundations, a number of burials were broken. Bones from the broken graves were collected and stacked in the mausoleum, and gravestones – in the trench. These tombstones are not preserved. Currently, on the site where the mosque once stood, there are two columns that once stood inside the mosque, as well as part of the wall with the roof. Mausoleum of Seyyid Yahya Bakuvi In the southern courtyard, next to the palace, stands a mausoleum, built in the second half of the 15th century, called the mausoleum of the "dervish" and known as the burial of the court scholar Khalil Ili Seyid Yahya Bakuvi, who was engaged in medicine, mathematics, and astrology. The mausoleum has an octagonal body, which completes the pyramidal tent. The interior of the mausoleum consists of an underground crypt where the tombstone of Bakuvi is located, and a camera above it. Small octagonal volume of the mausoleum turns into a drum covered with a dome. On the sides of the mausoleum there are three small windows carved into solid slabs of limestone, and, like in the old days, they are through-through stone gratings, consisting of multi-beam stars. The archway in the northern part connects the mausoleum with an older mosque. According to Abbaskuli aga Bakikhanov, "the cell where he prayed [Bakuvi], the school and the grave that are under the mosque named after him, still exist today". The palace mosque In