According to ancient legends, many monuments of Asia were founded by the son of King Siyavush, who, having married the daughter of the local ruler Afrasiab, decided to settle in place of the present Bukhara and build the fortress Ark. And then around the fortress villages of artisans, merchants, astrologers, scientists and various religious seers began to emerge. Near the market square, the Magoki-Attori mosque was built.
However, time passed and many constructions of Bukhara became artifacts in the open air. The Magoki-Attori Mosque is one of such artifacts.
The oldest surviving mosque Magoki-Attori is located in the center of the city of Bukhara, next to the ensembles of Lyabi-Khauz. In the early Middle Ages there was a cult pagan center with a temple of fire worshipers. After the conquest of Bukhara, the Arabs founded one of the first mosques on the site of this temple.
This is far from the first building in this place, as it was established during excavations that the mosque was rebuilt and reconstructed many times in the 9th, 12th and 15th centuries. The mosque is 4.5 meters below the ground level. Hence the name Magoki-Attori, as "magok" means "in the pit."
Today, the Islamic shrine is considered an excellent example of architectural decor. As the excavations have shown, the first mosque of the 9th century on this place was four-pillars. It was decorated with a carved piece and paintings. The fire of 937 passed from the northern gate to the mosque, which burned and all burnt out. "In the 12th century, a new building was erected on the same plan, which collapsed three centuries later, and the southern portal is the main artistic value of this monument
The monument of Magoki-Attori is closely connected with the centuries-old history of the city. Its peculiar architecture reflects several religions that existed in Bukhara. There is a version that before the construction of the first synagogue the Jews prayed with Muslims in the mosque of Magoki-Attori. Jews prayed with Muslims at the same time, but in different corners. According to another version, Jews came there only after the prayers of Muslims had ended. This can explain the custom that exists among Bukharian Jews, end the morning prayer with the words "Shalom Aleihem" ("Peace to you"). European Jews do not usually end this prayer.
Currently, the Magoki-Attori mosque houses a museum of carpets - a branch of the Bukhara State Architectural and Art Museum-Reserve. The exposition presents carpets and other carpets from the funds of the Bukhara Museum