He came out of seclusion in 499 and travelled to Cairo, Iskandariyya and other places, finally returning to Baghdad where he taught his magnum opus Ihya??? ???Ulum al-Din until his death in nearby Tus, occupying the remainder of his time with devotions, Qur???an recitations, prayer and fasting, and the company of Sufis.