In the Quran, Allah says in Surah An-Nisa, Verse 101: “And when you travel throughout the land, there is no blame upon you for shortening the prayer, [especially] if you fear that those who disbelieve may disrupt [or attack] you. Indeed, the disbelievers are ever to you a clear enemy.”
This verse clearly indicates that Muslims are allowed to shorten their prayers while traveling.
In the Hadith, it is reported that the Prophet Muhammad (peace be upon him) shortened his prayers during his travels. According to Sahih Bukhari, the Prophet (peace be upon him) would perform two Rakats for Dhuhr, Asr, and Isha prayers while he was traveling, instead of the usual four Rakats. This is also mentioned in Sahih Muslim.
The distance that qualifies for shortening the prayers during travel is determined by Islamic scholars based on the Hadith narrations of the Prophet Muhammad (peace be upon him) and his Companions. According to the majority of scholars, the minimum distance for which one is considered a traveler and may shorten their prayers is 48 miles or 77 kilometers. This is based on a Hadith narrated by Ibn Umar (may Allah be pleased with him) in which the Prophet (peace be upon him) said, “The traveler is allowed to shorten the prayer if he has covered a distance of three miles or more.” (Sahih Muslim)
However, some scholars are of the opinion that a person can shorten their prayers even if they are traveling a shorter distance, based on the context of the situation and their personal circumstances. For example, if a person is traveling for medical treatment, or to visit a sick relative, they may be allowed to shorten their prayers even if the distance is less than 48 miles.
It is important to note that the distance itself is not the only factor that determines whether one can shorten their prayers during travel. The intention and purpose of the journey, as well as the duration of the stay, are also considered by Islamic scholars in determining whether one qualifies as a traveler and can shorten their prayers.
It is more rewardful to pray a Qasr Prayer while on a journey. The Messenger of Allah (S.AW.) said: “It is a gift from Allah which he has bestowed upon you; so you should accept it.”