Modern scholars generally agree that Hafez was born either in 1315 or 1317. According to an account by Jami, Hafez died in 1390. Hafez was supported by patronage from several successive local regimes: Shah Abu Ishaq, who came to power while Hafez was in his teens; Timur at the end of his life; and even the strict ruler Shah Mubariz ud-Din Muhammad (Mubariz Muzaffar). Though his work flourished most under the 27-year rule of Jalal ud-Din Shah Shuja (Shah Shuja), it is claimed Hāfez briefly fell out of favor with Shah Shuja for mocking inferior poets (Shah Shuja wrote poetry himself and may have taken the comments personally), forcing Hāfez to flee from Shiraz to Isfahan and Yazd, but no historical evidence is available. Hafez also exchanged letters and poetry with Ghiyasuddin Azam Shah, the Sultan of Bengal, who also invited him to Sonargaon though he could not make it.