One of the most interesting places in the history of Bukhara - Magoki-Attari Mosque – is located in the central part of Bukhara. Its name is translated as "mosque in the pit," or literally as "deep mosque". This building got this name several centuries ago: already that time the cultural layers had hidden under the ground the large part of the building and the congregation, entering it, went down in the basement.
In the middle of the XVI century, the eastern portal was built, because the southern main entrance to the mosque was almost under ground. Only in 1930, archaeologists engaged in the restoration of this monument, and in the course of the work deepened to a depth of 4,5 meters, finding the unique remains of decor of the XII century and later restored the southern portal.
Delving into the past, it is worth to note another striking feature of this mosque. Once it was the place of prayers of Muslims and Jews, because until certain time, Jews did not have right to build their synagogue in Bukhara. According to one fact the representatives of two world religions prayed simultaneously, according to another version the Jews prayed after the Muslims. And the second version explains the custom of Bukharan Jews to end the morning prayer with the words "Shalom Aleichem," which is not present in other communities.
Going back to much earlier time, it is worth to well on the book of famous historian of Bukhara Abu Bakr Narshakhi, issued in 943, in which he wrote: "There was the bazaar in Bukhara, which was called bazaar Mokh. Public sales were held there only one day twice a year. Every time idols were sold in this bazaar ... the inhabitants of Bukhara in antiquity were idolaters, and that time the idols used to be trade in this bazaar; this custom was preserved... Later this place was the heathen temple of fire-worshipers; on the days designated for trade, people gathered here, all entered the heathen temple and worshiped the fire. This temple had existed before the establishment of Islam here, when Muslims, gaining strength, built on this site their mosque, and now it is one of the great mosques of Bukhara”. This indicates that the Magoki-Attari Mosque is one of the first mosques in Bukhara, and that there was the temple of worshipers on this site. Incidentally, during their campaigns of conquest, the Arabs always tried to build their mosques on the sites of temples of earlier religions.
Finishing our trip to the earliest history of this building, it should be noted two facts: Narshakhi in his work had already applied to this place the epithet "Magoki", and it means that as early as in the X century the mosque was hidden under the certain layer of soil. The presence of bazaar and temple worshipers before the building of the current mosque means that this place was one of central in the city and its history goes back thousands of years.
The mosque had seen a lot in its lifetime: it was place of prayers and rituals of representatives of three religions, and today Magoki-Attari is the museum of carpets. Such is its history.