Hadiths
The Messenger of God - may God’s prayers and peace be upon him - said: (Whoever treads a path in search of knowledge, God will make easy for him a path to Paradise).
The Messenger of God - may God’s prayers and peace be upon him - said: (Whoever God wants good for, He makes him understand the religion)
The Messenger of God - may God’s prayers and peace be upon him - said: (Seeking knowledge is an obligation upon every Muslim).
The Messenger of God - may God’s prayers and peace be upon him - said: (If a person dies, his work is cut off except for three: ongoing charity, beneficial knowledge, or a righteous child who
Faith Divine Decree and Predestination 1982 2026-10-11

Did al-Khidr Change the Divine Decree When He Killed the Boy? How Should We Understand the Story of the Boy and Divine Decree?

Question
In the story of al-Khidr, peace be upon him, he killed a boy because Allah, Most High, knew that if the boy lived, he would burden his parents with tyranny and disbelief. Does this mean that the boy had been decreed to live and become a disbeliever, and then al-Khidr came and changed this decree by killing him? How should we understand what happened in light of our belief that all matters are written and decreed by Allah, Most High? Can the divine decree change? And what is the difference between what Allah, Most High, wrote in the Preserved Tablet and what the angels write?
Answer

 

Praise be to Allah, and peace and blessings be upon the Messenger of Allah.

Al-Khidr did not change the decree of Allah, Most High, nor did anything happen outside of the divine decree. Rather, the killing of the boy itself was decreed and known to Allah, Most High. Allah commanded al-Khidr to do it, and in it there was mercy for the boy and his parents and protection from the harm that would have befallen them had he lived.

The Story of the Boy Was Part of the Divine Decree

Allah, Most High, says through the words of al-Khidr, peace be upon him:

“And I did it not of my own accord.” [Al-Kahf: 82]

What al-Khidr did was therefore not a personal judgment on his part, nor an action he undertook on his own initiative. Rather, he did it by the command and inspiration of Allah.

Al-Baghawi, may Allah have mercy on him, said in his interpretation of Allah's words, “And I did it not of my own accord”: meaning, “I did not do it according to my own choice and opinion; rather, I did it by the command and inspiration of Allah.”

Ibn Kathir, may Allah have mercy on him, stated that what al-Khidr did in the three incidents was by the command of Allah, and that he had been commanded to do these things and informed of them. He also mentioned that this is evidence for those who held that al-Khidr was a prophet, peace be upon him.

Therefore, the killing of the boy was not a change in the divine decree; rather, it was part of the divine decree itself. Allah, Most High, knew that the boy would be killed by al-Khidr and that this killing would be a means of saving his parents from the trial to which the boy would have subjected them.

Allah, Most High, says:

“No disaster strikes upon the earth or within yourselves except that it is in a register before We bring it into being. Indeed, that is easy for Allah.” [Al-Hadid: 22]

The Prophet ﷺ said:

“Allah wrote the decrees of all creation fifty thousand years before He created the heavens and the earth, and His Throne was upon the water.”

Narrated by Muslim (2653).

Did the Killing of the Boy Mean That Allah's Decree Was Changed?

No. No one can escape the divine decree or change what Allah, Most High, has written in the Preserved Tablet.

If Allah had decreed that al-Khidr would kill the boy, and that if the boy lived he would burden his parents with tyranny and disbelief, then all of this was known to Allah and written by Him.

This makes clear that when we say, “If the boy had lived, he would have done such-and-such,” this does not mean that the boy was actually decreed to live and that this decree was later changed. Rather, it means that Allah knew that if his life had continued, it would have led to that outcome, and He decreed that the boy would die at the hands of al-Khidr before reaching that outcome.

Why Was Killing the Boy a Mercy and a Good Outcome?

The killing of the boy may appear outwardly to be a severe and undesirable matter, but Allah informed us that behind it were mercy and wisdom. Al-Khidr, peace be upon him, said:

“And as for the boy, his parents were believers, and we feared that he would overburden them with transgression and disbelief. So we intended that their Lord should replace him with one better than him in purity and nearer to them in affection.” [Al-Kahf: 80–81]

Thus, there was mercy for his parents in this decree, and protection for them from being tested in their religion.

For this reason, Ibn Kathir, may Allah have mercy on him, mentioned that Allah's decree may be good and merciful for a servant even when its outward appearance is disliked. He cited the words of Allah:

“Perhaps you dislike a thing and it is good for you.” [Al-Baqarah: 216]

Can Anything in the Divine Decree Change?

Scholars distinguish between what is in the knowledge of Allah and what He has written in the Preserved Tablet, and what appears to the angels in their records.

What belongs to Allah's knowledge does not change, because Allah knows all things before they occur. He knows what will happen and what the outcomes of matters will be.

As for what is recorded in the records of the angels, there may be erasure and confirmation according to the causes that Allah has made effective, such as supplication and maintaining ties of kinship.

The Prophet ﷺ said:

“Nothing repels the divine decree except supplication, and nothing increases the lifespan except righteousness.”

Narrated by al-Tirmidhi (2139), and graded hasan by al-Albani.

A person's records with the angels may, for example, indicate that he will suffer an illness, and then he supplicates to Allah and is cured. Or it may be written that his lifespan will be such-and-such, and then he maintains ties of kinship, resulting in the increase mentioned in the hadith.

This does not mean that Allah first knew one thing and then discovered something different—exalted and far above that. Rather, Allah knew from the beginning that the servant would supplicate or maintain his ties of kinship, and that certain consequences would result from this.

How Should We Understand the Increase in Lifespan Through Maintaining Family Ties?

Al-Nawawi, may Allah have mercy on him, explained the hadith:

“Whoever would like his provision to be increased and his lifespan to be extended, let him maintain his ties of kinship.”

He explained that the increase in lifespan may be an increase through blessing, being enabled to perform acts of obedience, and using one's time in beneficial ways. It may also be understood in relation to what appears to the angels and what is written in their records: for example, it may appear to them that a person's lifespan will be sixty years, and if he maintains his ties of kinship, it is increased, while Allah had known from the beginning everything that would happen to him.

Therefore, this increase does not mean a change in Allah's prior knowledge. Rather, it concerns what becomes apparent to created beings and what is written in the records of the angels.

Conclusion

Al-Khidr, peace be upon him, did not change Allah's decree when he killed the boy. Rather, he killed him by the command of Allah, and the killing itself was part of what had been decreed and known to Allah.

Had the boy lived, he would have burdened his parents with tyranny and disbelief, and Allah decreed that he would die before reaching that point, and that his death would be a means of protecting his parents and replacing him with someone better.

As for the erasure and confirmation that may occur in the records of the angels because of supplication, maintaining family ties, and similar matters, this does not mean that Allah's knowledge or His prior decree changes. Rather, it is a change in what becomes apparent to the angels and what they record, while Allah knows all of it before it occurs.

And Allah knows best.