There is some scholarly disagreement concerning this Surah [i.e. concerning where it was revealed]; the majority is however of the opinion that it was revealed in Mecca, one among the first Surahs of the Qur'an to be revealed. Abu 'Uthman Sa'id ibn Muhammad ibn Ahmad al-Zahid informed us> his grandfather>Abu 'Amr al-Hiri> Ibrahim ibn al-Harith and 'Ali ibn Sahl ibn al-Mughirah who said: Yahya ibn Abi Bukayr informed us> Isra'il> Abu Ishaq> Abu Maysarah ['Amr ibn Shurahbil] who said: “The Messenger of Allah, Allah bless him and give him peace, whenever he went out, used to hear someone calling him 'O Muhammad!' And whenever he heard this, he used to flee. Waraqah ibn Nawfal advised the Prophet to remain in his place when the caller calls him so that he hears what he has to tell him. And so when he went out, he heard the calling: 'O Muhammad!' He said: 'Here I am! At your service!' The caller said: 'Say: I bear witness that there is no god but Allah and I bear witness that Muhammad is the Messenger of Allah'. Then he said: 'Say (Praise be to Allah, Lord of the Worlds, the Beneficent, the Merciful. Owner of the Day of Judgement…)' and he read until the end of the Opening of the Book”. This is also the opinion of 'Ali ibn Abi Talib. Abu Ishaq Ahmad ibn Muhammad, the Qur'anic commentator, informed us>al-Hasan ibn Ja'far, the commentator who said: Abu'l-Hasan ibn Muhammad ibn Mahmud al-Marwazi> 'Abd Allah ibn Mahmud al-Sa'di> Abu Yahya al-Qasri> Marwan ibn Mu'awiyah> al-'Ala' ibn al-Musayyab> al-Fudayl ibn 'Amr> 'Ali ibn Abi Talib who said: “The Opening of the Book was revealed in Mecca from a treasure beneath the divine Throne”. And through the same chain of transmission> al-Sa'di who said: 'Amr ibn Salih informed us> his father> al-Kalbi> Abu Salih> ibn 'Abbas who said: “The Prophet, Allah bless him and give him peace, stood up once in Mecca and said: 'In the Name of Allah, the Beneficent, the Merciful. Praise be to Allah, Lord of the Worlds'. The people of Quraysh said: 'May Allah strike your mouth' or something to this effect”. This was related by al-Hasan and Qatadah. But according to Mujahid, the Opening of the Book was revealed in Medina. About this opinion al-Husayn ibn al-Fadl said: “Every scholar has a lapse, and this is one lapse from Mujahid, since he is the only scholar who holds this opinion while all the other scholars disagree with him”.
Asbab Al-Nuzul by Al-Wahidi , trans. Mokrane Guezzou