Surah Al-Ankaboot

29:21

يُعَذِّبُ مَن يَشَآءُ وَيَرْحَمُ مَن يَشَآءُ ۖ وَإِلَيْهِ تُقْلَبُونَ

He punishes whom He wills and has mercy upon whom He wills, and to Him you will be returned.

Tafsir 29:21

He punishes whom He wishes from His creation through His justice, and He has mercy on whom He wishes amongst His creation through His grace.