Ghazali on showing off (riya)

Ghazali on showing off

Imam Ghazali’s book, Kitaab Al-Arba’in Fi Usul ad-Din, ‘The Forty Principles of the Religion,’ which he wrote before his death, is a summary of Ihya Ulumuddin, and his life’s works and thoughts.

In purification of the heart, Ghazali mentions 10 principles. Ostentation (riya) or doing things to show off is the last principle and it is a lengthy section. Ghazali looks at each disease, breaks it down and advises how to cure it using his own insights and experience.

Showing off (riya)

The Prophet (peace be on him) warned us against doing things for the sake of showing off. In the Quran Allah Almighty in Surat Maun talks about:

So woe to those ˹hypocrites˺ who pray

yet are unmindful of their prayers; (107:4-5)

These people are not praying to worship Allah, but praying to show others that they are praying, so their salah has no value. It is a sham. By contrast those who are not looking for worldly reward, fame, getting likes and being viral, or to be on the headlines, and on the front page, do things purely for Allah’s sake. They do good deeds because they are following Allah’s command and they are spreading goodness, without expecting praise or thanks:

[Saying], “We feed you only for the countenance of Allah. We wish not from you reward or gratitude. (76:9)

Expecting praise

Be careful of falling into the trap of expecting praise. When you put all your efforts into a project, pour your blood, sweat and tears into it to make it a success but you do not get acknowledged, and it fills you with sadness, ask yourself, did you do it because it was good useful and beneficial and pleasing to Allah or because you wanted people’s praise. If you are upset and deeply hurt, is this because you wanted to be recognised? What was your intention? If it was for Allah’s sake, it should not matter if you were praised or not. From a professional point of view, if you are project leader, or one of those who contributed to the success of the project, then you deserve to be mentioned. This is your right. But don’t let this change your intention. Ask yourself, would you do this project again even if your name was not mentioned? If you say no, then you have fallen into shaytan’s trap. Your primary intention should not be to please them.


There is an incident in our Islamic history, in which there was a fortress that the Muslims had been unable to penetrate. They had suffered many losses trying to access it, until an unknown person made a hole in it, climbed in, and opened the gate which enabled the Muslims to get in. Without his action they would never have been able to get in and win the battle. The leader of the Muslims wanted to thank the man, but he had disappeared immediately. An announcement was made inviting him to meet the leader and receive a reward, but no man came forward. Therefore another announcement was made, asking him to come forward to so he could be thanked. Eventually a man whose face was covered, presented himself to the leader, who began to praise him and thank him and asked him to show his face. The man refused to show his face, and said that he had not done what he had for praise, reward or thanks, he had only come to respond to the call. After that the leader used to say in his supplication, let me be like that man who did not show his face, because his actions were purely for Allah’s sake.

At the end of Surat al Kahf, Allah says:

Whoever looks forward to meet his Lord, let him do righteous works, and let him associate none with the worship of his Lord. (18:110)

Minor shirk

Mahmud ibn Labid reported:

The Messenger of Allah (peace be upon him) said, “Verily, my greater fear for you is the lesser idolatry.” They said, “What is the lesser idolatry, O Messenger of Allah?” The Prophet said, “It is ostentation. Allah Almighty will say to them on the Day of Resurrection, when people are being recompensed for their deeds: Go to those for whom you made a show in the world and look, do you find any reward with them?” (Musnad Ahmad)

The Prophet (peace be on him) was not afraid that the ummah would commit major shirk, which is worshipping idols (unless one ceases and repents for it):

Surely, Allah does not forgive that a partner is ascribed to Him, and forgives anything short of that for whomsoever He wills. Whoever ascribes a partner to Allah has indeed gone far astray. (4:116)

The sin of shirk is not forgivable, but shirk al asghar is minor shirk, which includes al riya (ostentation). Riya is hidden. It is not open like prostrating to an idol but like worshipping an idol, your intention is not for Allah’s sake, but for the sake of your ego, or status. Hidden shirk is very dangerous. In the terrifying hadith, the martyr, scholar and philanthropist will be thrown into hellfire if their intention was to seek fame.

On the authority of Abu Hurayrah (may Allah be pleased with him), who narrated that the Prophet (peace be on him) said:

عَنْ أَبِي هُرَيْرَةَ رَضِيَ اللَّهُ عَنْهُ، قَالَ: سَمِعْتُ رَسُولَ اللَّهِ صَلَّى اللَّهُ عَلَيْهِ وَسَلَّمَ يَقُولُ: ” إِنَّ أَوَّلَ النَّاسِ يُقْضَى يَوْمَ الْقِيَامَةِ عَلَيْهِ رَجُلٌ اسْتُشْهِدَ، فَأُتِيَ بِهِ فَعَرَّفَهُ نِعَمَهُ فَعَرَفَهَا، قَالَ: فَمَا عَمِلْتَ فِيهَا؟ قَالَ قَاتَلْتُ فِيكَ حَتَّى اسْتُشْهِدْتُ، قَالَ: كَذَبْتَ، وَلَكِنَّكَ قَاتَلْتَ لِأَنْ يُقَالَ: جَرِيءٌ، فَقَدْ قِيلَ، ثُمَّ أُمِرَ بِهِ فَسُحِبَ عَلَى وَجْهِهِ حَتَّى أُلْقِيَ فِي النَّارِ. وَرَجُلٌ تَعَلَّمَ الْعِلْمَ وَعَلَّمَهُ وَقَرَأَ الْقُرْآنَ، فَأُتِيَ بِهِ، فَعَرَّفَهُ نِعَمَهُ فَعَرَفَهَا، قَالَ: فَمَا عَمِلْتَ فِيهَا؟ قَالَ: تَعَلَّمْتُ الْعِلْمَ وَعَلَّمْتُهُ، وَقَرَأْتُ فِيكَ الْقُرْآنَ، قَالَ: كَذَبْتَ، وَلَكِنَّكَ تَعَلَّمْتَ الْعِلْمَ لِيُقَالَ: عَالِمٌ، وَقَرَأْتَ الْقُرْآنَ لِيُقَالَ: هُوَ قَارِئٌ، فَقَدْ قِيلَ، ثُمَّ أُمِرَ بِهِ، فَسُحِبَ عَلَى وَجْهِهِ حَتَّى أُلْقِيَ فِي النَّارِ. وَرَجُلٌ وَسَّعَ اللَّهُ عَلَيْهِ، وَأَعْطَاهُ مِنْ أَصْنَافِ الْمَالِ كُلِّهِ، فَأُتِيَ بِهِ، فَعَرَّفَهُ نِعَمَهُ فَعَرَفَهَا، قَالَ: فَمَا عَمِلْتَ فِيهَا؟ قَالَ: مَا تَرَكْتُ مِنْ سَبِيلٍ تُحِبُّ أَنْ يُنْفَقَ فِيهَا إِلَّا أَنْفَقْتُ فِيهَا لَكَ، قَالَ: كَذَبْتَ، وَلَكِنَّكَ فَعَلْتَ لِيُقَالَ: هُوَ جَوَادٌ، فَقَدْ قِيلَ، ثُمَّ أُمِرَ بِهِ فَسُحِبَ عَلَى وَجْهِهِ، ثُمَّ أُلْقِيَ فِي النَّارِ”.

The first of people against whom judgment will be pronounced on the Day of Resurrection will be a man who died a martyr. He will be brought and Allah will make known to him His favours and he will recognize them. [The Almighty] will say: And what did you do about them? He will say: I fought for you until I died a martyr. He will say: You have lied – you did but fight that it might be said [of you]: He is courageous. And so it was said. Then he will be ordered to be dragged along on his face until he is cast into hellfire. [Another] will be a man who has studied [religious] knowledge and has taught it and who used to recite the Quran. He will be brought and Allah will make known to him His favours and he will recognize them. [The Almighty] will say: And what did you do about them? He will say: I studied [religious] knowledge and I taught it and I recited the Quran for Your sake. He will say: You have lied – you did but study [religious] knowledge that it might be said [of you]: He is learned. And you recited the Quran that it might be said [of you]: He is a reciter. And so it was said. Then he will be ordered to be dragged along on his face until he is cast into hellfire. [Another] will be a man whom Allah had made rich and to whom He had given all kinds of wealth. He will be brought and Allah will make known to him His favours and he will recognize them. [The Almighty] will say: And what did you do about them? He will say: I left no path [untrodden] in which You like money to be spent without spending in it for Your sake. He will say: You have lied – you did but do so that it might be said [of you]: He is open-handed. And so it was said. Then he will be ordered to be dragged along on his face until he is cast into hellfire. (Muslim)

Allah does not accepts deeds which were not done for Him

Allah will never accept any deeds unless they are done purely for his sake. Ghazali mentions another hadith in which the Prophet (peace be on him) taught us to seek refuge in Allah from the Pit of Sorrow, which is a valley in Jahannam specifically for those who were reciting the Quran to show off their voice.

Allah said ‘Whoever performs a good deed for Me, but associates another with Me concerning it, it is for him entirely and I am free of it I am the Freest of those free from the need of partnership. (Muslim)

Nullifiers of deeds

Ghazali gives  us the equipment to check that a deed is pure and will get accepted. Since my childhood, I have repeatedly heard the hadith by the khateeb at the mimbar that Allah will not accept any deeds that are not done purely for his sake.

It was narrated that Abu ‘Umamah Al-Bahili said:

‏ إِنَّ اللَّهَ لاَ يَقْبَلُ مِنَ الْعَمَلِ إِلاَّ مَا كَانَ لَهُ خَالِصًا وَابْتُغِيَ بِهِ وَجْهُهُ ‏”‏ ‏.‏النسائي.

“Allah does not accept any deed, except that which is purely for Him, and seeking His Face.’” [Nasa’i]

The man in the mosque

In a very famous story, told by Ismaili on the virtues of Umar (may Allah be pleased with him), he reprimanded a man in the mosque who had bowed his neck abjectly, saying, khushoo is not in your neck it is in your heart! He was trying to show that he was very pious but Umar who was blessed with insight could tell that it was not genuine. It is like the joke about the man who overheard himself being praised for his recitation and salah and added, ‘I’m fasting as well’.

Actions are but by intention

What counts is what is in your heart, not what you are portraying to others. Not the quantity but quality. Not the external, but the internal – the intention.

Umar (may Allah be pleased with him) narrated that the Messenger of Allah (peace be on him) said:

عَنْ عُمَرَ بْنِ الْخَطَّابِ، قَالَ قَالَ رَسُولُ اللَّهِ صلى الله عليه وسلم ‏ “‏ إِنَّمَا الأَعْمَالُ بِالنِّيَّةِ وَإِنَّمَا لاِمْرِئٍ مَا نَوَى فَمَنْ كَانَتْ هِجْرَتُهُ إِلَى اللَّهِ وَرَسُولِهِ فَهِجْرَتُهُ إِلَى اللَّهِ وَرَسُولِهِ وَمَنْ كَانَتْ هِجْرَتُهُ لِدُنْيَا يُصِيبُهَا أَوِ امْرَأَةٍ يَتَزَوَّجُهَا فَهِجْرَتُهُ إِلَى مَا هَاجَرَ إِلَيْهِ ‏”‏ ‏.‏متفق عليه

(The value of) an action depends on the intention behind it. A man will be rewarded only for what he intended. (Buhkari and Muslim)

However, intention alone is not enough for a deed to be accepted. In order for it to be accepted it should be carried out with knowledge of how to do it according to the sunnah.

Spiritual leaders and top scholars have always been afraid of riya, because it nullifies deeds. Imam Qatada said:

When someone is acting with riya (showing off) Allah will say, ‘Look at My servant. He is mocking me.’

Hasan Basri (may Allah be pleased with him) said:

‘I was in the company of many righteous people. And some of them would have a wise word to say, which would benefit others, but the only thing preventing him from saying it, is that he does not want to be famous.’

This is a special high level of people who were so afraid of riya who did not want their deeds to be turned to dust on the Day of Judgement, because they were tainted by an impure intention or desire for attention.

Ghazali’s definition of riya is seeking status in people’s hearts though worship and good deeds. When you do something for people’s praise, it is riya.

6 types of riya

Body: Those who eats very little, so they appear thin and have parched, cracked lips, due to excessive fasting to show others how pious they are. Neglect their hygiene and appear sad because they want to show that they are so pious that they are only dwelling on the akhirah.

Form: Those who shave their moustache, lower their heads, move slowly, have a mark on their forehead from being prostrated for long time, shut their eyes to show they are deep in thought.

Appearance: Dressing in rough cloth to show they do not care about dunya. Wearing patched and unwashed clothes to show how humble they are and detached from dunya and to get visited by wealthy people asking for their dua. This is not the practice of the sunnah, which is to take care of your hygiene, be well groomed, dress well and to be presentable.

Statements: Trying to impress people with their words, name-dropping shuyukh, quoting ayahs and hadith, to appear knowledgeable. Not acting upon what they say. Moving their lips to show they are in a constant state of dhikr, when their hearts are empty and full of sins. And commanding people to do good and refrain from sin, when they do not actually care about it but want to show that they are pious.

Actions: Prolonging and beautifying your ibadah in front of others to impress them. Distributing a lot of charity, going for umrah and hajj repeatedly. Wanting to be known as Hajji.

Company: Having many friends, companions and students to show how popular they are.

All of this is haram. It is from the major sins.

Shaykh Haytham Tamim – The Thursday Al Ghazali Class 

Related posts

Ghazali on self admiration

Ghazali on how to cure arrogance

Ghazali on pride

Ghazali on love of dunya

Ghazali on love of status

Ghazali on how much wealth is sufficient

Ghazali on stinginess

Ghazali on envy

Duas for protection

Ghazali on breaking free from anger

Evils of the tongue 5 – praise

Evils of the tongue 4 – joking

Evils of the tongue 3 – arguing

Evils of the tongue 2- backbiting

Evils of the tongue 1- lying

The benefits of feeling hunger

Why is following the sunnah the key to success. Ghazali’s secrets part 1

What is wrong with excessive laughter?

Do you have to practice what you preach?

Self righteousness when giving counsel

Command good and forbid evil

Brotherhood, friendship and wilayah

How to deal with difficult neighbours

The first 6 rules of how to deal with people

Dealing with gossip (7-8)

How to deal with people according to their status (9-11)

Cover the faults of others (12-13)

Shake hands (15 continued)

Defend others in their absence, be tactful, be cautious of the company of the rich (16-18)

Avoid the people of ghaflah

Be good to your relatives

Love they neighbour


Shaykh Haytham Tamim is the founder and main teacher of the Utrujj Foundation. He has provided a leading vision for Islamic learning in the UK, which has influenced the way Islamic knowledge is disseminated. He has orchestrated the design and delivery of over 200 unique courses since Utrujj started in 2001. His extensive expertise spans over 30 years across the main Islamic jurisprudence schools of thought. He has studied with some of the foremost scholars in their expertise; he holds some of the highest Ijazahs (certificates) in Quran, Hadith (the Prophetic traditions) and Fiqh (Islamic rulings). His own gift for teaching was evident when he gave his first sermon to a large audience at the age of 17 and went on to serve as a senior lecturer of Islamic transactions and comparative jurisprudence at the Islamic University of Beirut (Shariah College). He has continued to teach; travelling around the UK, Europe and wider afield, and won the 2015 BISCA award (British Imams & Scholars Contributions & Achievements Awards) for Outstanding Contribution to Education and Teaching.