عن عبد الله بن زيد بن عاصم المازني رضي الله عنه قال: (شُكِيَ إلى النبيِّ صلى الله عليه وسلم الرَّجلُ يُخَيَّلُ إِليه أنَّه يَجِد الشَّيء في الصَّلاة، فقال: لا ينصرف حتَّى يَسمعَ صَوتًا، أو يَجِد رِيحًا).
[صحيح] - [متفق عليه]
‘Abdullāh ibn Zayd ibn ‘Āsim al-Māzini (may Allah be pleased with him) reported that a complaint was made to the Prophet (may Allah’s peace and blessings be upon him) about the person who doubts that something (breaking his ablution) has happened to him during his prayer, and he said: "He should not leave (his prayer) unless he hears a sound or perceives a smell."
Sahih/Authentic. - [Al-Bukhari and Muslim]
An-Nawawi (may Allah have mercy upon him) said that this Hadīth is one of the general and fundamental principles of Islam on which many significant rulings are built. This principle signifies that ruling of things which one is certain about should remain effective and should not be changed because of doubts or assumptions. Even if doubts are strong, they should not affect the ruling as long as they have not reached the level of certainty or strong probability. This Hadīth is one of the many examples showing application of this principle. If a Muslim is certain about his being in a state of purity, and then he has doubts that something occurred that invalidated his purity, the ruling is that he still remains in a state of purity. Conversely, if a Muslim is certain that something happened that invalidated his purity, and later has doubts about his being in a state of purity, the ruling is that he remains in a state of impurity. The same ruling applies to the clothes and places, which are considered pure by default until their impurity is certainly proved. Another example is the number of Rak‘ahs that one performs in prayer. If a Muslim is sure that he has performed three Rak‘ahs and is doubtful about the fourth one, the basic ruling is that the fourth one is not done and he should perform it. Also, if a man is doubtful about divorcing his wife, the basic ruling is that the marriage remains effective, and so on and so forth.