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:3:128

Not for you, ˹O Muhammad, but for Allah˺, is the decision whether He should ˹cut them down˺ or forgive them or punish them, for indeed, they are wrongdoers.  

When, on the Day of Uhud, the Prophet received a head wound and his front tooth was broken, and he said, ‘How does a people who have drenched the face of their Prophet in blood ˹expect to˺ prosper?’, the following was revealed: It is no concern at all of yours, nay, it is God’s concern, so be patient, whether, meaning, until such time as, He relents to them, through ˹their acceptance of˺ Islam, or chastises them; for they are indeed evildoers, by ˹virtue of their˺ disbelief.
القرآن:٣:١٢٨

لَيْسَ لَكَ مِنَ الْأَمْرِ شَيْءٌ أَوْ يَتُوبَ عَلَيْهِمْ أَوْ يُعَذِّبَهُمْ فَإِنَّهُمْ ظَالِمُونَ  

ونزلت لما كسرت رباعيته ﷺ وشج وجهه يوم أحد وقال: "" كيف يفلح قوم خضبوا وجه نبيهم بالدم "" (ليس لك من الأمر شيء) بل الأمر لله فاصبر (أو) بمعنى إلى أن (يتوب عليهم) بالإسلام (أو يعذبهم فإنهم ظالمون) بالكفر.

See similar narrations below:

Collected by Tirmidhī, Ibn Ḥibbān
tirmidhi:3005Yaḥyá b. Ḥabīb b. ʿArabī al-Baṣrī > Khālid b. al-Ḥārith > Muḥammad b. ʿAjlān > Nāfiʿ > ʿAbdullāh b. ʿUmar

"The Messenger of Allah ﷺ was supplicating against four people, so Allah, Blessed and Most High, revealed: Not for you is the decision; whether He turns in mercy towards them or punishes them; verily they are the wrongdoers (3:128). So Allah guided them to Islam."  

الترمذي:٣٠٠٥حَدَّثَنَا يَحْيَى بْنُ حَبِيبِ بْنِ عَرَبِيٍّ الْبَصْرِيُّ حَدَّثَنَا خَالِدُ بْنُ الْحَارِثِ عَنْ مُحَمَّدِ بْنِ عَجْلاَنَ عَنْ نَافِعٍ عَنْ عَبْدِ اللَّهِ بْنِ عُمَرَ

أَنَّ رَسُولَ اللَّهِ ﷺ كَانَ يَدْعُو عَلَى أَرْبَعَةِ نَفَرٍ فَأَنْزَلَ اللَّهُ (لَيْسَ لَكَ مِنَ الأَمْرِ شَيْءٌ أَوْ يَتُوبَ عَلَيْهِمْ أَوْ يُعَذِّبَهُمْ فَإِنَّهُمْ ظَالِمُونَ ) فَهَدَاهُمُ اللَّهُ لِلإِسْلاَمِ  

قَالَ أَبُو عِيسَى هَذَا حَدِيثٌ حَسَنٌ غَرِيبٌ صَحِيحٌ يُسْتَغْرَبُ مِنْ هَذَا الْوَجْهِ مِنْ حَدِيثِ نَافِعٍ عَنِ ابْنِ عُمَرَ وَرَوَاهُ يَحْيَى بْنُ أَيُّوبَ عَنِ ابْنِ عَجْلاَنَ

ذِكْرُ الْخَبَرِ الْمُدْحِضِ قَوْلَ مَنْ زَعَمَ أَنَّ هَذَا الْخَبَرَ تَفَرَّدَ بِهِ الزُّهْرِيُّ عَنْ سَالِمٍ

ibnhibban:1988Aḥmad b. Yaḥyá b. Zuhayr al-Ḥāfiẓ Bitustar > Yaḥyá b. Ḥabīb b. ʿArabī > Khālid b. al-Ḥārith > Ibn ʿAjlān > Nāfiʿ > Ibn ʿUmar

[Machine] "Indeed, the Prophet ﷺ used to supplicate against certain individuals in his prayer. So, Allah revealed: 'You have no authority over the matter, [O Muhammad], or over them. So, do not blame yourself for their disbelief or be distressed by their actions. Indeed, they are wrongdoers.'"  

ابن حبّان:١٩٨٨أَخْبَرَنَا أَحْمَدُ بْنُ يَحْيَى بْنِ زُهَيْرٍ الْحَافِظُ بِتُسْتَرَ قَالَ حَدَّثَنَا يَحْيَى بْنُ حَبِيبِ بْنِ عَرَبِيٍّ قَالَ حَدَّثَنَا خَالِدُ بْنُ الْحَارِثِ عَنِ ابْنِ عَجْلَانَ عَنْ نَافِعٍ عَنِ ابْنِ عُمَرَ

«أَنَّ النَّبِيَّ ﷺ كَانَ يَدْعُو عَلَى أَقْوَامٍ فِي قُنُوتِهِ» فَأَنْزَلَ اللَّهُ {لَيْسَ لَكَ مِنَ الْأَمْرِ شَيْءٌ أَوْ يَتُوبَ عَلَيْهِمْ أَوْ يُعَذِّبَهُمْ فَإِنَّهُمْ ظَالِمُونَ}