Seeking Forgiveness

Why would Allah punish you if you are grateful and faithful?

4:147What concern hath Allah for your punishment if ye are thankful (for His mercies) and believe (in Him)? Allah was ever Responsive, Aware.