The Prophet (peace and blessings be upon him) said in an authentic hadith:
“Deeds are judged by how they end.”
He also said (peace and blessings be upon him):
“A servant may perform the deeds of the people of Paradise until only a cubit separates him from it; then what has been decreed overtakes him, and he performs the deeds of the people of Hell and enters it. And a servant may perform the deeds of the people of Hell until only a cubit separates him from it; then what has been decreed overtakes him, and he performs the deeds of the people of Paradise and enters it.”
For this reason, it has been reported:
“Satan is most relentless against the son of Adam at the time of death. He says to his helpers, ‘Seize this one! If he escapes you, you will never get hold of him again.’”
The account of Abd Allāh ibn Ahmad ibn Hanbal with his father, who was saying, “No, not yet. No, not yet,” is well known.
For this reason, it is said that this is feared for someone who has not performed Hajj, because Anas ibn Mālik (may Allah be pleased with him) narrated that the Prophet (peace and blessings be upon him) said:
“Whoever possesses provisions or a mount that can convey him to Allah’s Sacred House, yet does not perform Hajj, let him die as a Jew if he wishes, or as a Christian if he wishes.”
Allah Most High said:
“Pilgrimage to the House is a duty owed to Allah by all people who are able to make their way to it. And whoever disbelieves—Allah has no need of any of His creation.”
Ikrimah said: When this verse was revealed:
“Whoever seeks a religion other than Islam, it will never be accepted from him, and in the Hereafter he will be among the losers,”
the Jews and Christians said, “We are Muslims.” So Allah said to them:
“Pilgrimage to the House is a duty owed to Allah by all people.”
They said, “We will not make pilgrimage to it.” Then Allah Most High said:
“And whoever disbelieves—Allah has no need of any of His creation.”