Caution: Translations of Quran and Ḥadīth may lead to possible misapplications and misinterpretations. This site is intended for students of sacred knowledge that are proficient in comprehending classical Arabic and have a strong foundation in Islamic sciences. Also note that religious injunctions rely on several aspects beyond what one may glean through reading individual aḥādīth.
quran:48:25

They are the ones who disbelieved and obstructed you from al-Masjid al-Haram while the offering was prevented from reaching its place of sacrifice. And if not for believing men and believing women whom you did not know - that you might trample them and there would befall you because of them dishonor without ˹your˺ knowledge - ˹you would have been permitted to enter Makkah˺. ˹This was so˺ that Allah might admit to His mercy whom He willed. If they had been apart ˹from them˺, We would have punished those who disbelieved among them with painful punishment  

They are the ones who disbelieved and barred you from the Sacred Mosque, that is, ˹barred you˺ from reaching it, and ˹prevented˺ the offering (wa’l-hadya is a supplement to the ˹suffixed pronoun˺ –kum, ‘you’ ˹of saddūkum, ‘they barred you’˺), which was detained (ma‘kūfan is a circumstantial qualifier), from reaching its destination, that is, ˹from˺ the place at which it is customarily sacrificed, namely, the Sanctuary ˹itself˺ (an yablugha mahillahu, is an inclusive substitution). And were it not for ˹some of˺ the believing men and believing women, being present at Mecca alongside the disbelievers, whom you did not know, to be believers — lest you should trample them, that is to say, ˹lest˺ you should slay them together with the disbelievers, had you been given permission to embark on the conquest (an tata’ūhum is an inclusive substitution for –hum, ‘them’ ˹of lam ta‘lamūhum, ‘whom you did not know’˺), and thus incur sin on account of them without, your, knowing, it … (the third person pronouns in both groups ˹of people˺ predominantly imply males; the response to lawlā, ‘were it not’, has been omitted ˹through ellipsis˺, being ˹something along the lines of˺ la-udhina lakum fī’l-fathi, ‘you would have been permitted to embark on the conquest’), but permission for this was not given at the time, so that God may admit into His mercy whom He will, such as those believers mentioned. Had they been clearly separated, ˹had˺ they ˹the believers˺ been distinguishable from the disbelievers, We would have surely chastised the disbelievers among them, of the people of Mecca ˹immediately˺ thereat, by permitting you to go ahead with the conquest thereof, with a painful chastisement.
القرآن:٤٨:٢٥

هُمُ الَّذِينَ كَفَرُوا وَصَدُّوكُمْ عَنِ الْمَسْجِدِ الْحَرَامِ وَالْهَدْيَ مَعْكُوفًا أَنْ يَبْلُغَ مَحِلَّهُ ۚ وَلَوْلَا رِجَالٌ مُؤْمِنُونَ وَنِسَاءٌ مُؤْمِنَاتٌ لَمْ تَعْلَمُوهُمْ أَنْ تَطَئُوهُمْ فَتُصِيبَكُمْ مِنْهُمْ مَعَرَّةٌ بِغَيْرِ عِلْمٍ ۖ لِيُدْخِلَ اللَّهُ فِي رَحْمَتِهِ مَنْ يَشَاءُ ۚ لَوْ تَزَيَّلُوا لَعَذَّبْنَا الَّذِينَ كَفَرُوا مِنْهُمْ عَذَابًا أَلِيمًا  

{هم الذين كفروا وصدوكم عن المسجد الحرام} أي عن الوصول إليه {والهدي} معطوف على كم {معكوفا} محبوسا حال {أن يبلغ محله} أي مكانه الذي ينحر فيه عادة وهو الحرم بدل اشتمال {ولولا رجال مؤمنون ونساء مؤمنات} موجودون بمكة مع الكفار {لم تعلموهم} بصفة الإيمان {أن تطئوهم} أي تقتلوهم مع الكفار لو أذن لكم في الفتح بدل اشتمال من هم {فتصيبكم منهم معرة} أي إثم {بغير علم} منكم به وضمائر الغيبة للصنفين بتغليب الذكور، وجواب لولا محذوف، أي لأذن لكم في الفتح لكن لم يؤذن فيه حينئذ {ليدخل الله في رحمته من يشاء} كالمؤمنين المذكورين {لو تزيَّلوا} تميزوا عن الكفار {لعذَّبنا الذين كفروا منهم} من أهل مكة حينئذ بأن نأذن لكم في فتحها {عذابا أليما} مؤلما.