Jami` at-Tirmidhi, Volume 5, Book 44, Hadith 3172 (DarusSalam) ⓘ
Narrated Sa'eed bin Jubair: "When the Prophet was expelled from Makkah a man said: 'They have driven out their Prophet' so (the following) was revealed: "Permission (to fight) is given to those who are fought against, because they have been wronged; and surely, Allah is able to give them victory. Those who have been expelled from their homes unjustly (22:39)." [Those who were expelled were the Prophet and his Companions.]
حَدَّثَنَا مُحَمَّدُ بْنُ بَشَّارٍ، حَدَّثَنَا أَبُو أَحْمَدَ الزُّبَيْرِيُّ، حَدَّثَنَا سُفْيَانُ، عَنِ الأَعْمَشِ، عَنْ مُسْلِمٍ الْبَطِينِ، عَنْ سَعِيدِ بْنِ جُبَيْرٍ، قَالَ لَمَّا أُخْرِجَ النَّبِيُّ صلى الله عليه وسلم مِنْ مَكَّةَ قَالَ رَجُلٌ أَخْرَجُوا نَبِيَّهُمْ فَنَزَلَتْ : ( أذِنَ لِلَّذِينَ يُقَاتَلُونَ بِأَنَّهُمْ ظُلِمُوا وَإِنَّ اللَّهَ عَلَى نَصْرِهِمْ لَقَدِيرٌ * الَّذِينَ أُخْرِجُوا مِنْ دِيَارِهِمْ بِغَيْرِ حَقٍّ ) النَّبِيُّ صلى الله عليه وسلم وَأَصْحَابُهُ .
also referenced under: Hadith 3172 (Reference) & Book 47, Hadith 3471 (In-Book)