Nahj al-Balagha Hadith n. 290

Selections from The Sayings and Preaching of Amir al-Muminin Ali ibn Abi Talib (Peace Be Upon Him) Including His Replies to Questions and Maxims Expressed for Various Purposes.
Translated by Sayyid Ali Reza

وَقَالَ (عليه ‏السلام):

Amir al-mu'minin, peace be upon him, said:

لَوْ لَمْ يَتَوَعَّدِ اللهُ عَلَى مَعْصِيَةٍ

Even if Allah had not warned of chastisement on those disobedient to Him,

لَكَانَ يَجِبُ أَنْ لاَ يُعْصَى شُكْراً لِنِعَمِهِ.

it would be obligatory by way of gratefulness for His favours that He should not be disobeyed.