Ibn al-Qayyim, may Allah have mercy on him, said: “It was said: what do you say concerning the prayer of one who has no khushu, does he have to repeat it or not?

With regard to whether it will count for the purposes of reward, it will not be counted, except for [the parts] where one is focused and has the correct attitude of khushu towards one’s Lord.

Ibn ‘Abbas, may Allah be pleased with him said: ‘You will gain nothing from your prayer except the parts where you were focused.’

In the Musnad it is reported that the Prophet, peace and blessings of Allah be upon him, said: “A person may offer a prayer, and nothing will be recorded of it for him except half of it, or a third, or a quarter … or a tenth.”

Allah has made the success of the worshipper in prayer dependent on their khushu, and has indicated that the one who has no khushu will not be among the successful. If it is counted for them for the purpose of reward, they will be one of the successful. With regard to the matter of whether it counts in terms of worldly rulings and exempts them from having to repeat it, if they focused with proper khushu for most of the prayer, it is OK, according to scholarly consensus. The sunnah prayers and adhkar recited after prayer make up for anything that is lacking.

But in the case where there was no khushu or proper focus for most of the prayer, there is a difference of opinion among the fuqaha’. Ibn Hamid, one of the companions of Ahmad, thought it obligatory to repeat the prayer. The fuqaha’ also differed with regard to khushu in prayer, and there are two scholarly opinions on this point. They are to be found in the Hanbali madhhab and others.

These opinions differ as to whether it is obligatory to repeat prayers in which one encountered a great deal of waswaas or insinuating thoughts from Shaytan. Ibn Hamid among the companions of Ahmad said that it was obligatory, but the majority of fuqaha’ do not share this view.

They take as evidence the fact that the Prophet, peace and blessings of Allaah be upon him, commanded the one who gets mixed up in their prayer to do sajdatay al-sahw (two prostrations of forgetfulness); he did not say that the prayer has to be repeated, even though he said, “The Shaytaan comes to any one of you when he is praying and says, ‘Remember such and such, remember such and such,’ about something that he had forgotten, until he misguides him to the extent that he does not know how much he has prayed.” (Recorded in al-Bukhari and Muslim)

There is no dispute regarding the fact that there is no reward for the prayer except for the portion in which a person had proper presence of mind, as the Prophet, peace and blessings of Allah be upon him, said:

“Verily, a man may finish his prayer but nothing is written for him except one tenth, ninth, eighth, seventh, sixth, fifth, quarter, third, or half of it.” (Recorded in Abu Dawud)

Ibn ‘Abbas, may Allah be pleased with him, said: “You will gain nothing from your prayer except what you focus on.” So [the prayer] is not correct if you are looking at it from the point of view that it has to be perfect, but it may be regarded as valid in the sense that we are not commanded to repeat it. (Madaarij al-Saalikeen, 1/112).

It was reported in al-Saheeh that the Prophet, peace and blessings of Allah be upon him, said:

“When the muezzin calls the adhaan, the Shaytan runs away farting, so that he will not hear the adhan. When the adhan is over, he comes back. When the prayer starts, he runs away, but once it is in progress, he comes back, until he comes between a man and his own soul, and says, ‘Remember such and such, remember such and such,’ which he had forgotten, until he cannot remember how much he has prayed. If any one of you experiences this, let him do two prostrations of forgetfulness (sajdat al-sahw) whilst he is sitting.” (Recorded in al-Bukhari and Muslim)

They said: The Prophet, peace and blessings of Allah be upon him, commanded him, with regard to this prayer in which the Shaytan made him forget how much he had prayed, to do the two prostrations of forgetfulness. He did not command him to repeat it. If the prayer was invalid – as they claim – he would have told him to repeat it.

They said: This is the reason for the two prostrations of forgetfulness – to annoy the Shaytan for “whispering” insinuating thoughts to a person and coming between him and his own soul when he is praying. For this reason, these two prostrations are also called al-murghimatayn (the two annoying ones). (Madaarij al-Saalikeen, 1/528-530).

If you say that the prayer has to be repeated, so as to gain the benefits and rewards, then that is up to the individual. If he wants to gain those benefits, he can, and if he wants to miss out, he can. If you say that we have to force people to repeat the prayer and punish them if they do not, applying to them the rulings on those who forsake prayer, then this is not right. This is the more correct of the two opinions. And Allaah knows best.