 The structure was captured by the Arabs during the conquest of Persia in AD 637.They then used it as a mosque for a while until the area was gradually abandoned.In the early 10th century, the Abbasid caliph al-Muktafi dug up the ruins of the palace to reuse its bricks in the construction of the Taj Palace in Baghdad.