Habib Ali al-Jifri said: “I asked my teacher, Habib Umar bin Hafiz: which is more dangerous – being proud of one’s actions or being proud of one’s understanding?”
Habib Umar replied (may Allah protect him): “Being proud of one’s understanding is more dangerous than being proud of one’s actions and its outcome is more serious. Look at the response of Iblis (may Allah protect us from him): I am better than him – You created me from fire and You created him from earth.
Iblis relied upon his understanding and did not mention any of his actions.”
Pride (‘ujb) stems from attributing things to oneself and being heedless of Allah’s enabling grace (tawfiq). Imam al-Ghazali mentions that it is more subtle than ostentation (riya’). May Allah save us.