Magoki Attori Mosque is located in the historical centre of Bukhara and is considered to be the oldest mosque in the city. It was built in the IX century on the ruins of pre-Islamic temple Moh. After the invasion of Arabs and the establishment of Islam the fire temple was demolished. During excavations, ancient baths and the walls of an ancient temple were found.
The mosque and the whole Bukhara were destroyed during the fire in 937. In the XII century, a new mosque was built resembling the old one. The construction was ruined in the XVI century and only a portal in the south part remained. There is an inscription on the eastern portal saying that the mosque of Magoki Attori was revived in the XVI century.
For centuries the mosque was disappearing under the layers of sand. The most part of the complex was buried and the mosque was virtually dug out of dust and sand. This ancient mosque is a unique piece of architecture. The oldest portals are decorated with carved terracotta, polished bricks, carving on alabaster, majolica, etc. Every detail indicated a particular era.