He lifted his hand off the ground whilst prostrating to scratch his skin; is his prayer invalidated?
Question

If someone lifts his hand or foot whilst prostrating, then places it on the ground and completes his prostration, does that invalidate his prayer? For example, he needed to scratch his skin whilst prostrating, so he lifted one of his hands – is his prayer invalid? If he did that absentmindedly, is his prayer invalid and does he have to repeat it?
Praise be to Allah.Prostration must be done on the seven parts on which the Prophet (blessings and peace of Allah be upon him) was instructed to prostrate, as was narrated by al-Bukhaari (812) and Muslim (490) from Ibn ‘Abbaas (may Allah be pleased with him), who said: The Prophet (blessings and peace of Allah be upon him) said: “I have been commanded to prostrate on seven bones: the forehead – and he pointed to his nose – the hands, the knees and the ends of the feet (i.e., toes).”
An-Nawawi (may Allah have mercy on him) said in Sharh Muslim (4/208):
If he omits one of them, his prayer is not valid. End quote.
The majority of scholars (including Imam Maalik, Imam ash-Shaafa‘i, and Imam Ahmad) quoted this as evidence that prostration is not valid unless it is done on all of these parts; if a person prostrates on only six of them, his prostration is not valid.
Ibn Rajab al-Hanbali (may Allah have mercy on him) said in Fath al-Baari:
This view is supported by the saheeh hadiths which enjoin prostrating on all of these parts, and the command indicates that it is obligatory. End quote.
Fath al-Baari, by Ibn Rajab (5/114-115).
Based on that, if someone lifts up one of the parts of prostration from the ground for the duration of prostration, and does not prostrate on it, his prayer is not valid.
As for the one who lifts it briefly, his prayer is still valid, in sha Allah.
Shaykh Muhammad ibn ‘Uthaymeen (may Allah have mercy on him) was asked:
Someone lifted one of the parts of prostration from the ground; was his prayer rendered invalid whilst he was prostrating?
He replied:
What appears to be the case is that if he lifted it throughout the prostration – i.e., he continued to prostrate with one of those parts lifted off the ground – then his prostration is invalid, and if prostration is invalidated then the prayer is invalidated. But if he lifted it briefly, such as scratching one foot with the other, then put it back, then I hope that there was nothing wrong with it. End quote.
Liqaa’aat al-Baab al-Maftooh.
He also said:
Prostrating on these seven parts is obligatory in all prostrations, meaning that it is not permissible to lift any of those parts off the ground whilst prostrating, neither the hand nor the foot nor the nose nor the forehead nor any of these seven parts. If a person does that, then if it lasted for the duration of his prostration, then there is no doubt that his prostration is not valid, because he omitted one of the parts on which he is obliged to prostrate.
But if it happened whilst prostrating, meaning that he got an itch in his foot, for example, so he scratched it with the other foot, then this is subject to further discussion. It may be said that his prayer is invalid, because he omitted this obligatory action during part of his prostration.
Or it may be said that his prayer is valid, because what matters is what is mostly the case. If for most of the time he was prostrating on the seven parts, then that is valid.
Based on that, in order to be on the safe side, he should not lift any part off the ground, and he should be patient even if he gets an itch on his hand for example, or on his thigh, or on his foot; he should be patient and wait until he has risen from prostration. End quote.
Ash-Sharh al-Mumti‘ (3/37).
And Allah knows best.