The history of this mosque goes back to the 7th-century ad. Even before that, it served as a place for the heathen fire cults of these days. The current structure, with its 288 domes and 208 pillars, dates back to 1514 and was built to rival the famous Bibi-Khanym Mosque in Samarkand. It was the attempt by the local governor to start the formation of a new capital (and for a time quite successful).