Circumstances of Revelation
Place: Medina. Either the whole sūrah is Medinan, or verses 1–22 are Medinan and verses 23–31 Meccan. Shia narrations from the Ahl al-Bayt agree that it was revealed in Medina, and numerous (mustafīḍah) Sunni narrations confirm this. → Introduction
Verses 5–22, the occasion: Revealed about ʿAlī, Fāṭimah, al-Ḥasan and al-Ḥusayn. In Ibn ʿAbbās's account, when al-Ḥasan and al-Ḥusayn fell ill, ʿAlī, Fāṭimah and their maid Fiḍḍah vowed to fast three days for their recovery. On each evening, as they sat down to break the fast, a poor man, then an orphan, then a captive came to the door, and they gave him their food and fasted again on water. On the fourth day Gabriel brought this sūrah. Imam al-Ṣādiq gives a shorter account, adding that the verses apply to any believer who does the same for God's sake. → Narrations · Key Debate
Why Medina: Verse 8 mentions feeding a captive, and Muslims took captives only after the Hijrah. Since the verses are one connected passage, the whole first section was revealed in Medina. Al-Mizan answers the view that the sūrah is early Meccan: vivid descriptions of paradise and hell, and commands to patience, also occur in Medinan sūrahs. A single report from Ibn ʿAbbās that it is Meccan contradicts his many reports that it is Medinan. → Commentary on verse 8 · Narrations
The man who died of yearning: Some reports say the sūrah was revealed while a black man was with the Prophet, and that he died on hearing its description of paradise. Al-Mizan: if authentic, these show that the revelation coincided with his story, not that it was its cause. → Narrations
Verses 23–31: These resemble Meccan verses in tone and message; if they are Meccan, the first section was revealed in Medina and the rest in Mecca. Their mention of prayer at dawn, in the afternoon and at night may date them before the five daily prayers were set (). Qatādah reports that do not obey any sinner or disbeliever among them (verse 24) concerned Abū Jahl. → Commentary · Narrations
A summary prepared from Tafsīr al-Mīzān: where and when the sūrah was revealed, and the occasions reported for its verses, with the ʿAllāmah's view of them. Each point links to the full discussion.