Overcoming Trials | The Message of Surah al Kahf

By Sh. Ahsan Hanif

Allah, the Most High, informs us that the Qur’an is meant for reflection and contemplation. Allah states,

“A Book which We have sent down to you, full of blessings that they may ponder over its Verses, and that men of understanding may remember.” Ṣād, 38:29. 

One of the many reasons we find ourselves disconnected from the Qur’an is due to us losing this ability to ponder and reflect over the greatest of Speech. The Pagan Arabs for all their polytheistic beliefs and enmity to Islam were overwhelmed by the linguistic beauty and poetry of the Qur’an. Indeed, even the most formidable of creations such as the mountains cannot withstand its power.[2]

Since 2009, I have been researching and teaching the Tafsīr of Sūrah al-Kahf, the eighteenth chapter of the Qur’an. Yet despite years of study and having taught it a dozen times or so, the beauty of this sūrah never ceases to amaze me. It was from amongst the early portions of the Qur’an to be revealed as is mentioned in the ḥadīth of the Prophet ṣallallāhu 'alayhi wa sallam (peace and blessings of Allāh be upon him)[3]. It is the chapter which we are encouraged to recite every Friday[4] and told that by memorising or reading its opening passage we will gain protection from the Dajjāl.[5] Yet over and above this, the four stories mentioned within this sūrah are unique to it. In this short article I want to analyse the central theme and message of this sūrah as well as why from the 114 chapters of the Qur’an, it is this one which affords us protection from the Dajjāl.

Every chapter of the Qur’an has a theme; a central subject matter which it discusses. The verses, stories and main discussion points of the chapter will then all establish that theme. It is for this reason that Allah mentions only certain parts of a story of a particular Prophet in one sūrah and other parts of the same story in another sūrah. The reason is often that only this portion of the story is relevant to the theme. This is also why we find certain similar verses repeated throughout the Qur’an, often with very slight variations; a word added or removed.

Like this?
Get more of our great articles.

The Muslims in the early years of Islam faced various trials and difficulties. Those trials would change over time and evolve as the situation of the Muslims progressed. Therefore, it is as if Allah revealed this chapter in the early part of Prophethood so that the Muslims would be aware of the challenges they would face, and more importantly how to overcome them. Thus the theme of Sūrah al-Kahf revolves around the most common trials faced by the faithful and their solutions. Allah says in the seventh verse of this sūrah,

“Verily! We have made that which is on earth as an adornment for it, in order that We may test them as to which of them are best in deeds.” Al-Kahf, 18:7.

These trials are depicted through the four unique stories found within this surah; the people of the cave, the man with the two gardens, Mūsā’s journey with Khiḍr and Dhul-Qarnayn.

A Trial of Persecution of One’s Beliefs

The story of the people of the cave centres on a group of believing young men who lived in a society of shirk, wherein those young men were persecuted for their beliefs. Allah records how they stood firm upon their beliefs, addressing their despot ruler and their people,

“And We made their hearts firm and strong when they stood up and said: ‘Our Lord is the Lord of the heavens and the earth, never shall we call upon any god other than Him; if we did, we should indeed have uttered an enormity in disbelief.’” Al-Kahf, 18: 14.

In many ways this resembles the situation of the early Muslims when they were often tortured and persecuted simply for saying ‘Lā ilāha illa Allah’. Those believing young men fled their city for fear of their lives just as the Companions fled Makkah seeking the sanctuary of Madinah.

“And when you withdraw from them, and that which they worship, except Allah, then seek refuge in the Cave, your Lord will open a way for you from His Mercy and will make easy for you your affair.” Al-Kahf, 18:16. 

Allah answered this supplication and gave these young men a great miracle, showing His mercy towards the believers, and His power over the creation.


“And they stayed in their Cave three hundred years, and add nine.”Al-Kahf, 18: 25.

This too was the case with the Prophet ṣallallāhu 'alayhi wa sallam (peace and blessings of Allāh be upon him) and his Companions, who were often given victory despite the odds.

“And thus We made their case known to the people, that they might know that the Promise of Allah is true, and that there can be no doubt about the Hour.” Al-Kahf, 18:21.

This is one of the most common trials the believers will face; trials to do with their faith. At its most extreme, it can lead to persecution and torture, but there are many other forms it can take. Derogatory remarks, uncomfortable stares and sometimes a deficiency complex when having to openly show our religion in front of others are all forms many of us have experienced. At times, it can be our own family and friends who attempt to dissuade us when we want to increase in our attempts to practice Islam. Throughout this story we are told of the ways to overcome this trial; strong īmān, turning to Allah, depending and trusting in Him and making duʻā to Him.

“Truly! They were young men who believed in their Lord, and We increased them in guidance.” Al-Kahf, 18: 13.  

A trial of Wealth

The second trial mentioned within this chapter is depicted through the story of the man who possessed two gardens. The story and thus the trial revolves around wealth. Allah had blessed this man with much wealth as is described in vivid detail in the Qur’an,

“And put forward to them the example of two men; unto one of them We had given two gardens of grapes, and We had surrounded both with date-palms; and had put between them cultivated fields. Each of those two gardens brought forth its produce, and failed not in the least therein, and We caused a river to gush forth in the midst of them. And he had fruit…” Al-Kahf, 18: 32-34.

Thus, the man not only possessed the best of wealth as is alluded to through the mention of grapes; historically a fruit associated with the nobility, but the upkeep of his gardens was minimal due to the naturally flowing rivers, and his harvest was full every season. Additionally, he also enjoyed the blessing of children, servants and other supporters.

Yet all of the above only led him to arrogance and haughtiness. He belittled his much poorer friend and ridiculed his advice to show gratitude to Allah.

“And he went into his garden while in a state of injustice to himself. He said: ‘I think not that this will ever perish. And I think not the Hour will ever come, and if indeed I am brought back to my Lord, I surely shall find better than this when I return to Him.’” Al-Kahf, 18:35-36.

He foolishly thought that his wealth and manpower was a sign of Allah’s love and acceptance. Why else would he receive such blessings?! Therefore, even if there was to be a resurrection, surely a God who loved him and showered him with such blessings in this life, would only increase him manifold in the next.

Allah destroyed the wealth of this man to show him and us that the wealth of this world is not a sign of Allah’s pleasure or displeasure, but rather a test through which Allah examines our belief, action and character. It is not about the wealth in and of itself, but how you earn and spend it.

“So his fruits were encircled with ruin. And he remained clapping his hands with sorrow over what he had spent upon it, while it was all destroyed on its trellises, he could only say: ‘Would I had ascribed no partners to my Lord!’ And he had no group of men to help him against Allah, nor could he defend or save himself.” Al-Kahf, 18: 42-43.

A dichotomy is presented within this story in the poor sincere friend who admonished his richer companion for his beliefs and actions. In many ways, it is this humbleness, humility and gratitude for the blessings of Allah which helps one overcome this trial. The Prophet ṣallallāhu 'alayhi wa sallam (peace and blessings of Allāh be upon him) said, “By Allah, it is not poverty which I fear for you but that the world will be spread out before you just as it was spread out for those who came before you, and you compete in it as they did, so it destroys you as it did them.”[15]

It should not be understood from this that wealth is evil or to be wealthy is unpraiseworthy. Indeed, there were numerous wealthy and prosperous Companions such as Abū Bakr and ʻUthmān. However, the evil in wealth is when it becomes the goal in life, rather than a means to the real goal of pleasing Allah. When this happens, wealth can easily leads to arrogance, pride and belittling others.

A Trial of Knowledge

The third unique story in Sūrah al-Kahf is that of the two Prophets, Mūsā and Khiḍr. Although the story of Mūsā is oft-mentioned in the Qur’an, this particular encounter is mentioned only this once. It is a story where knowledge becomes a trial. This is perhaps a perplexing concept as we normally only associate knowledge with goodness and benefit. Yet just as with wealth, knowledge too can be used for good and evil. It can also lead to arrogance, pride and looking down upon others deemed less knowledgeable rather than the noble attributes it should nurture within us; humbleness, piety and a genuine concern for the wellbeing of others. How many times have we been guilty of possessing these ignoble traits as a result of some small measure of knowledge we acquired?

Mūsā stood one day amongst his people and delivered a sermon. He was then asked as to who was the most knowledgeable of people. To this question he replied that he was without associating his knowledge to Allah.[16] Allah then instructed him to travel to the junction of the two seas where he would find one endowed with more knowledge than him in certain affairs.

“And when Mūsā said to his boy-servant: ‘I will not give up until I reach the junction of the two seas or until I spend years and years in travelling.’” Al-Kahf, 18: 60.

The Prophet Mūsā then embarks upon a journey with Khiḍr in which they encounter three amazing situations wherein Mūsā fails to grasp the wisdom of Khiḍr’s actions. The scuttling of the ship, killing of the young boy and repair of the crumbling wall are then explained to Mūsā at the end of their time together. This story possesses so many lessons and etiquettes that it requires a separate article in order to do justice to them.[18] Suffice to say that Mūsā, one of the greatest and mightiest Messengers of Allah learns his lesson of humbleness before Allah when he first approaches Khiḍr by asking him to teach from the knowledge Allah has bestowed upon him,

“May I follow you so that you teach me something of that knowledge which you have been taught?” Al-Kahf, 18: 66.

A Trial of Power

The fourth and final story concerns the king who conquered the East and West. The story of Dhul-Qarnayn concerns the trial of power. When Dhul-Qarnayn had conquered the West, Allah tested his immense power,

“Until, when he reached the setting place of the sun, he found it setting in a spring of black muddy water. And he found near it a people. We said: ‘O Dhul-Qarnayn! Either you punish them, or treat them with kindness.”Al-Kahf, 18: 86.

Instead of going to either extreme of treating all his subjects harshly or with kindness, Dhul-Qarnayn established justice,

“He said: ‘As for him who does wrong, we shall punish him; and then he will be brought back unto his Lord; Who will punish him with a terrible torment. But as for him who believes and works righteousness, he shall have the best reward, and we shall speak unto him mild words.’” Al-Kahf, 18: 87-88.

This then was the constitution of Dhul-Qarnayn as he went to conquer the East and the lands between the East and West. His justice, compassion and goodness is further highlighted in the way he dealt with those people who requested his assistance against the oppression of Gog and Magog.

“They said: ‘O Dhul-Qarnayn! Verily! Gog and Magog are doing great mischief in the land. Shall we then pay you a tribute in order that you might erect a barrier between us and them?’ He said: ‘That in which my Lord had established me is better. So help me with strength, I will erect between you and them a barrier.’”Al-Kahf, 18: 94-95.

Although this story speaks about power at the highest level, it is the same concept of justice and compassion which helps us deal with power at any level and in any form. Parents hold a measure of power over their children, a husband likewise over his wife, an employer similarly over his or her employees and so on. It was this that the Prophet ṣallallāhu 'alayhi wa sallam (peace and blessings of Allāh be upon him) was emphasising in the famous statement, “Indeed all of you shepherds and each one of you is responsible for their flock.”[23]

The Connection to the Dajjāl

The Dajjāl is the greatest of trials as the Prophet ṣallallāhu 'alayhi wa sallam (peace and blessings of Allāh be upon him) said, “There is not a trial from the time of Adam until the Hour greater than the Dajjāl.”[24] But why is this chapter of the Qur’an so closely connected with the Dajjāl? The answer is because the Dajjāl will bring these same four trials mentioned within this sūrah. Thus by reading, memorising and understanding the theme of this chapter as well as the solutions contained therein, one can inshā Allah overcome the trials of the Dajjāl.

The call of the Dajjāl will be that he is God. He will then persecute and oppress those who oppose him and disbelieve in Him. The people of that time will have experienced drought and famine. He will pass by a group of people ordering them to believe in him, and when they refuse he will leave, but as soon as he does all their crops and rations will be destroyed.[25] As such, he will use the first trial of persecuting people for their beliefs.

The second trial of wealth will also be used by him. Those who believe in him will be given plentiful crops and food, and he will order the sky above them to bring forth its rain and the earth around them to bring forth its vegetation. He will pass by barren lands and order it to bring forth its treasures.[26]

This ability to apparently bring forth rain, vegetation and earthly treasures is all as a result of the knowledge and power Allah has bestowed upon him. He will use this to misguide humankind and take them away from the worship of Allah; thus exemplifying the third and fourth trials mentioned in Sūrah al-Kahf. Therefore, by knowing these trials one protects themselves from not only their singular emergence but their collective occurrence at the hands of the Dajjāl.

The Solution

The solution to these four trials is to increase in īmān, hold onto the Qur’an and follow the example of the Prophet ṣallallāhu 'alayhi wa sallam (peace and blessings of Allāh be upon him). This solution is summarised within the chapter twice, once at the beginning and once at the end. Allah says at the beginning of this sūrah highlighting the three step solution,

“All the praises and thanks be to Allah, Who has sent down to His slave the Book, and has not placed therein any crookedness. Straight to give warning of a severe punishment from Him, and to give glad tidings to the believers, who work righteous deeds, that they shall have a fair reward.” Al-Kahf, 18:1-2.

Within the first verse Allah praises Himself, an act which increases the believer in faith, and then mentions the Messenger and the Book.

Likewise, Allah concludes the chapter by saying,

“Say, ’If the sea were ink for writing the Words of my Lord, surely, the sea would be exhausted before the Words of my Lord would be finished, even if we brought another sea like it for its aid. Say: ‘I am only a man like you. It has been inspired to me that your God is One God. So whoever hopes for the Meeting with his Lord, let him work righteousness and associate none as a partner in the worship of his Lord.” Al-Kahf, 18: 109-110.

Once again, Allah mentions His Words, the Prophet ṣallallāhu 'alayhi wa sallam (peace and blessings of Allāh be upon him) and worshipping Him alone which is the essence of faith.

This is the very essence of the understanding of the Companions who were informed by the Prophet () of the Dajjāl and all the terrors he would bring, including his reign on Earth; forty days in total, a day the length of a year, a day the length of a month, a day the length of a week and then all the other days being normal in length. The Companions upon hearing all of this only thought to ask a single question, ‘How do we pray on those lengthy days?’[29] This question gives us an insight into the thinking of the Companions and how they understand the solution to the trials of this life as the prayer is the lifeline of the believer.


[2] Al-Ḥashr, 59:21.

[3] Ṣaḥīḥ al-Bukhārī, no. 4739 from the narration of ʻAbdur-Raḥmān ibn Yazīd who narrates from Ibn Masʻūd.

[4] Mishkāt al-Maṣābīḥ, no. 2116 from the narration of Abū Saʻīd al-Khudrī.

[5] Ṣaḥīḥ Muslim, no. 809 from the narration of Abu al-Dardā’.

[15] Ṣaḥīḥ al-Bukhārī, no. 6425 from the narration of ʻAmr ibn ʻAwf.

[16] Ibid, no. 4727 from the narration of Ubayy ibn Kaʻb.

[18] Inshā’ Allah this will be the topic of discussion in a forthcoming article.

[23]Ṣaḥīḥ al-Bukhārī, no. 2409 from the narration of ʻAbdullāh ibn ʻUmar.

[24] Ṣaḥīḥ Muslim, no. 2946 from the narration of ʻImrān ibn Ḥuṣayn.

[25] Ibid, no. 2937 from the narration of Al-Nawwās ibn Samʻān.

[26] Ibid.

[29] Ṣaḥīḥ Muslim, no. 2937 from the narration of Al-Nawwās ibn Samʻān.


Shaykh Ahsan Hanif, PhD, was born and raised in Birmingham, UK. He memorised the Qur’an at a young age and at the age of 17 received a scholarship to study at the Islamic University of Madinah, Saudi Arabia. As well as attaining an ijazah in the Qur’an and a diploma in Arabic, Shaykh Ahsan graduated from the Faculty of Shari’ah Studies in 2006. Upon his return to the UK he attained his PhD from the University of Birmingham.

He is currently an imam at Green Lane Masjid, Birmingham as well as the head of the Qur’an & Hadith Studies Department for AlMaghrib Institute. He has spoken at Islamic conferences in various countries, published translations of Arabic works and is a presenter of IslamQA for Islam Channel.

10 / View Comments

10 responses to “Overcoming Trials | The Message of Surah al Kahf”

  1. Manna says:


    JazakAllahu khyr shakyh for this reminder.

  2. Manahil says:

    SubhanAllah I never understood why this particular Surah has been emphasized to read every friday! Alhamdullilah now I got my answer.

  3. G says:

    This has enlightened me a lot…
    Thank you for this very informative article…

  4. The_Observer says:

    SubhanAllah. Beautiful article. May Allah SWT grant us all such deep insights into the Quran. Ameen

  5. Abdul Malik says:

    Understanding how Dajjal will operate thru Surah Al Kahf.
    Surah Al-Kahf tells 4 stories.
    1. People of the cave.
    2. Story of the garden with two neighbor.
    3. Story of 2 prophets with two different knowledge.
    4. Story of the Just Ruler.

    Dajjal will therefore works in the opposite.
    The Just Ruler will be tyrant rulers.
    Religious scholars will be corrupts scholars and will then corrupts the religions.
    Businessmen will be corrupted and so too with business dealings.
    The people will be oppress and misguided.

    May Allah guides us through these trials.

  6. Fatima says:

    JazakAllahu khayran.
    Until now, I never really understood the reason behind reading the surah every Friday.

  7. aadil says:

    azakAllahu khayran.

  8. Abdul Aziz Adams says:

    Alhamdulillah, the summary of the lessons in this surah is very much appreciated. May Allah bless you abundantly.

  9. Lilah says:

    Jazkallah khair very much may allah give you jannah. This is much better than the lengthy explanations by scholars on youtube. You’ve explained it so clearly alhamdulillah

Leave a Reply

Your email address will not be published. Required fields are marked *