The Persians under Khosrau II invaded Palestine and conquered nearby Jerusalem in 614, but they did not destroy the structure. According to legend, their commander Shahrbaraz was moved by the depiction above the church entrance of the Three Magi wearing the garb of Persian Zoroastrian priests, so he ordered that the building be spared.