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:39:51

And the evil consequences of what they earned struck them. And those who have wronged of these ˹people˺ will be afflicted by the evil consequences of what they earned; and they will not cause failure.  

So the evils of what they earned smote them, that is, the requital thereof ˹smote them˺. And the evildoers among these, namely, ˹among˺ Quraysh, shall also be smitten by the evils of what they earned, and they will not be able to thwart it: ˹they will not˺ elude Our chastisement — thus they were made to suffer seven years of drought and ˹only˺ afterwards were they enriched ˹with provision from God˺.
القرآن:٣٩:٥١

فَأَصَابَهُمْ سَيِّئَاتُ مَا كَسَبُوا ۚ وَالَّذِينَ ظَلَمُوا مِنْ هَٰؤُلَاءِ سَيُصِيبُهُمْ سَيِّئَاتُ مَا كَسَبُوا وَمَا هُمْ بِمُعْجِزِينَ  

{فأصابهم سيئات ما كسبوا} أي جزاؤها {والذين ظلموا من هؤلاء} أي قريش {سيصيبهم سيئات ما كسبوا وما هم بمعجزين} بفائتين عذابنا فقحطوا سبع سنين ثم وسع عليهم.