Read the story
In 1500, soldiers came to a family tomb in Baku, dug up the body of a king who had been dead for decades, burned it, and scattered what was left. The king was Khalilullah the First, and the tomb sat in the palace his dynasty had built.
The Shirvanshahs once ruled from Shamakhi, until a devastating earthquake pushed Shirvanshah Ibrahim the First to move his capital to Baku, on the Caspian. By most accounts, work on a palace began in 1411. It rose in stone, with 52 rooms linked by three narrow spiral staircases.
His son Khalilullah inherited it in 1418 and held the throne for about 47 years. He swore loyalty to Shah Rukh, son of Timur, and turned to building. In the mid-1430s he raised a tomb for his mother and his son, and the craftsman carved his own name, Muhammad Ali, into the portal. Nearby stood a mosque whose minaret carries the ruler's name, and a bathhouse. Later in the century came the Divankhana, a graceful pavilion whose purpose is still debated: a council hall, a court, or perhaps another tomb.
Then the dynasty's fortunes collapsed. Safavid forces took Baku in 1501, and the palace slid into ruin. In 1723, Peter the Great's troops bombarded the city and battered the palace. By the mid-1800s, the Russian military was using the rooms as warehouses, knocking out interior walls and cutting new doors.
Rescue came in the 1930s, when Boris Zasypkin designed a major restoration, and in 1964 the complex became a state museum-reserve.
Today its courtyard holds carved stone panels from Sabayil, a castle built in the 1230s that sank into the Caspian after an earthquake in 1306 and resurfaced centuries later, when the sea pulled back. Their friezes name 15 Shirvanshahs. Khalilullah's bones were lost to fire, but his family's names came back from the sea, and now rest beside the tomb he built.