It is reported that Al-Hasan Al-Basrî – Allâh have mercy on him – said:
It has reached me that when Allâh the Mighty and Majestic blesses a people and gives them some good he asks them to be grateful. If they are grateful, He is all-able to give them more. But if they are ungrateful, He is all-able to turn His blessings into a punishment.
Al-Bayhaqî, Shu’ab Al-Imân article 4536.