Al-Baqarah - 2:52

ثُمَّ عَفَوْنَا عَنكُمِ مِّن بَعْدِ ذَلِكَ لَعَلَّكُمْ تَشْكُرُونَ
[2:52]
Then We pardoned you after that so that you might give thanks.
Even then We did forgive you; there was a chance for you to be grateful.
Then, even after that, We pardoned you in order that ye might give thanks.