It is one of the oldest structures in Central Asia that escaped destruction during the invasion of the Mongol army. The history of the mosque dates back centuries: starting from the XII-XIII centuries, the building underwent significant alterations.
The lower portal, which dates back to that era, stands out in particular. Gradually, the ground level rose, and the structure literally sank deeper into the soil, giving the impression of being located in a depression.
In order to adapt to the new conditions, in the 16th century, a new portal was erected on top of the former one, now located at the same level with the earth's surface (almost five meters above the initial level). It was only in the 1930s, when large-scale restoration work was carried out, that the building was completely freed from the accumulated cultural layers.
The shape of the mosque is traditionally simple — a compact rectangle measuring about 12×7.5 meters. A characteristic feature of the original entrance is a slight asymmetry and a laconic design, complemented by eight-shaped drums with covered decorative domes. The main portal is vividly highlighted with rich decoration with geometric patterns made by the technique of laying special ceramic tiles.
The name of the Magoki-Attari mosque dates back to pre-Islamic times, when there was a deep depression ("magok") on this site, surrounded by a small market selling a variety of spices and medicinal plants. This explains the second part of the name — the word "attar" meant a seller of herbs and perfumes.
A carpet-making museum is now operating within the walls of the historical temple, allowing guests to experience the art of making famous oriental carpets.