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:18:55

And nothing has prevented the people from believing when guidance came to them and from asking forgiveness of their Lord except that there ˹must˺ befall them the ˹accustomed˺ precedent of the former peoples or that the punishment should come ˹directly˺ before them.  

And nothing prevented people, that is, the disbelievers of Mecca, from believing (an yu’minū is ˹after alnāsa, ‘people’˺ constitutes the second direct object clause) when the guidance, the Qur’ān, came to them, and from asking forgiveness of their Lord, without that there should come upon them the precedent of the ancients (sunnatu’l-awwalīn constitutes the subject of the verb) that is to say, Our precedent of dealing with them, which is the destruction decreed for them, or that the chastisement should come upon them before their very eyes, in front of them and for them to see — which was their being killed on the day of Badr (a variant reading ˹for qibalan˺ has qubulan, which ˹in the accusative˺ is the plural of qabīlin, meaning, ‘of various kinds’).
القرآن:١٨:٥٥

وَمَا مَنَعَ النَّاسَ أَنْ يُؤْمِنُوا إِذْ جَاءَهُمُ الْهُدَىٰ وَيَسْتَغْفِرُوا رَبَّهُمْ إِلَّا أَنْ تَأْتِيَهُمْ سُنَّةُ الْأَوَّلِينَ أَوْ يَأْتِيَهُمُ الْعَذَابُ قُبُلًا  

{وما منع الناس} أي كفار مكة {أن يؤمنوا} مفعول ثان {إذ جاءهم الهدى} القرآن {ويستغفروا ربهم إلا أن تأتيهم سنة الأولين} فاعل أي سنتنا فيهم وهي الإهلاك المقدر عليهم {أو يأتيهم العذاب قبلاً} مقابلة وعيناً، وهو القتل يوم بدر وفي قراءة بضمتين جمع قبيل أي أنواعا.