An-Nisa 4:64
وَمَآ أَرْسَلْنَا مِن رَّسُولٍ إِلَّا لِيُطَاعَ بِإِذْنِ ٱللَّهِ ۚ وَلَوْ أَنَّهُمْ إِذ ظَّلَمُوٓا۟ أَنفُسَهُمْ جَآءُوكَ فَٱسْتَغْفَرُوا۟ ٱللَّهَ وَٱسْتَغْفَرَ لَهُمُ ٱلرَّسُولُ لَوَجَدُوا۟ ٱللَّهَ تَوَّابًا رَّحِيمًا
Wama arsalna min rasoolin illaliyutaAAa bi-ithni Allahi walaw annahum iththalamoo anfusahum jaooka fastaghfarooAllaha wastaghfara lahumu arrasoolulawajadoo Allaha tawwaban raheema
And We did not send any messenger except to be obeyed by permission of Allāh. And if, when they wronged themselves, they had come to you, [O Muḥammad], and asked forgiveness of Allāh and the Messenger had asked forgiveness for them, they would have found Allāh Accepting of Repentance and Merciful.
We did not send any Messenger but to be obeyed by the leave of Allah. Had they, after having wronged themselves, come to you and sought forgiveness from Allah, and had the Messenger prayed for their forgiveness, they would certainly have found Allah Most-Relenting, Very-Merciful.