Shahrisabz is, above all, associated with the Ak-Saray palace. Many amazing legends are linked with the history of the palace's construction. According to one of them, Timur began to think of building a magnificent edifice, summoned an architect and set out his objective. After listening to the ruler, the architect asked to be allowed into the state exchequer. When permission was granted, the craftsman started to make foundation blocks from clay mixed with gold in full view of Timur. Seeing that the ruler remained impassive, he broke up the blocks and returned the gold to the exchequer. When Timur asked: "Why did you do that?" the architect replied: "So as to make sure of your determination to embark on constructing a building that requires vast expenditure." The palace building in Shahrisabz took over a quarter of a century to construct. The Spanish ambassador, Ruy Gonzalez de Clavijo, who passed through Shahrisabz in 1404 on his way to the court of Timur in Samarkand, was astounded and charmed by the architectural miracle, and he left a detailed description of it, noting, however, that the splendid artistic decoration of the palace was still unfinished. The overall layout, scale and artistic appearance of Ak-Saray can be reconstituted from the descriptions of contemporaries and eyewitnesses, as well as from the results of archaeological excavation at the site.