
❖ Question:
Is it permissible to perform prayer while traveling in a train, or is it impermissible?
❖ Answer:
Al-ḥamdu lillāh, waṣ-ṣalātu wa-s-salāmu ʿalā Rasūlillāh, ammā baʿd:
There is no specific prohibition regarding performing ṣalāh (prayer) in a train.
The general Sharʿī rule is:
If a person has control and stability over the means of conveyance, then it is permissible to offer voluntary (nafl) prayers upon it —
just as the Messenger of Allah ﷺ used to pray on his camel when needed.
This is explicitly mentioned in Ṣaḥīḥ al-Bukhārī.
❖ General Principle:
If a person is riding a vehicle not fully under his control, such as a moving train, then both obligatory (farḍ) and voluntary (nafl) prayers are permissible, due to necessity and practical circumstances.
This ruling is supported by the Qur’an, the Sunnah, and the practice of the Companions.
❖ Evidence from the Qur’an:
﴿وَمَا جَعَلَ عَلَيْكُمْ فِي الدِّينِ مِنْ حَرَجٍ﴾
“Allah has not placed upon you any hardship in religion.”
(Sūrah al-Ḥajj, 22:78)
❖ Evidence from the Ḥadīth:
اَلدِّينُ يُسْرٌ
“The religion is easy.”
And the Prophet ﷺ said:
حَيْثُ أَدْرَكْتَ الصَّلَاةَ فَصَلِّ
“Wherever you find the time for prayer, perform the prayer there.”
(Ṣaḥīḥ al-Bukhārī, Ṣaḥīḥ Muslim)
❖ Opinions of the Imāms and Scholars:
① Imām Shams al-Ḥaqq al-Diyānpūrī رحمه الله
He issued the same ruling in al-Taʿlīq al-Mughnī, citing the following ḥadīth as proof:
عَنِ ابْنِ عُمَرَ: سُئِلَ رَسُولُ اللَّهِ ﷺ عَنِ الصَّلَاةِ فِي السَّفِينَةِ، فَقَالَ: «صَلِّ قَائِمًا إِلَّا أَنْ تَخَافَ الْغَرَقَ»
(Narrated by Ibn ʿUmar رضي الله عنهما)
Translation:
When the Messenger of Allah ﷺ was asked about praying on a ship, he said:
“Pray standing, unless you fear drowning.”
This indicates that prayer on a moving vehicle (ship or train) is valid, provided one does what is possible within his means.
(al-Taʿlīq al-Mughnī, vol. 1, p. 396)
② Practice of the Companions رضي الله عنهم:
It is authentically reported from Jābir ibn ʿAbdillāh, Abū Saʿīd al-Khudrī, and Abū Hurayrah رضي الله عنهم that they performed prayer standing in a ship, and even prayed in congregation on board.
③ Ruling of the Classical Scholars:
In Sunan Saʿīd ibn Manṣūr, it is mentioned at the conclusion:
“وفيه دليل على صحة الصلاة على المركب يقال له في الهندية ‘ریل’، وبه أفتى شيخنا المحدث الأبجل السيد نذير حسين الدهلوي.”
Translation:
“This ḥadīth is proof of the validity of prayer on a vehicle called in India ‘rail’ (train), and our esteemed teacher, the great Muḥaddith, Sayyid Nadhīr Ḥusayn al-Dihlawī, also issued a fatwā in support of this.”
(al-Taʿlīq al-Mughnī, vol. 1, p. 396)
④ Fatwā of Sayyid Nadhīr Ḥusayn al-Dihlawī رحمه الله:
He explicitly permitted praying in a train, as recorded in:
Fatāwā Nadhīriyyah, vol. 1, p. 559, Kitāb al-Ṣalāh; also ʿAwn al-Maʿbūd.
Summary of the Ruling:
◈ Performing prayer in a train is completely permissible, whether obligatory or voluntary.
◈ It should be performed standing and facing the Qiblah, if possible.
◈ If not, then one may pray seated, facing as close to the Qiblah as circumstances allow.
◈ This ruling is based on ease in the Sharīʿah and clear prophetic guidance.
ھٰذا ما عندي، والله أعلم بالصواب
This is what I hold to be correct, and Allah knows best what is right.