Is it permissible for someone to travel to another city in order to attend the funeral prayer of a pious person or a scholar? If it is permissible, how do we reconcile this permissibility with the statement of the Prophet (peace be upon him): “Do not undertake a journey except to three mosques”?
The funeral prayer is a collective obligation upon the Muslims. As long as some of the Muslims offer it, the obligation is fulfilled for all of the Muslims. As long as that obligation is met by the community, participation in the funeral prayer is a Sunnah for the individuals who wish to participate in it.
The Prophet (peace be upon him) said: “Whoever prays the funeral prayer for someone will receive a mountain of reward. Whoever then follows the deceased until burial will receive double that reward.” [Sahîh al-Bukhârî (1325) and Sahîh Muslim (945)]
The legitimate means taken to accomplish something have the same legal ruling as the ends for which they are undertaken. Actions are according to intentions. Therefore, whoever travels to carry out a legitimate act of worship that cannot be accomplished without traveling – like traveling to seek knowledge or to uphold kinship ties or to defend Islam or to visit a brother in faith – then he is doing something good and his journey is a journey of obedience.
On the other hand, if undertaking such a journey involves considerable difficulties or will cause the person to leave off something else that is of greater importance, then it would be better for that person not to undertake the journey.
This actually has nothing to do with the meaning of the hadîth: “Do not undertake a journey except to three mosques: al-Masjid al-Harâm, my mosque, and al-Aqsâ Mosque.” [Sahîh al-Bukhârî (1864) and Sahîh Muslim (1397)]
What the hadîth is discussing – and Allah knows best – is someone undertaking a journey to the specific locality of a mosque or some other place in order to worship at that specific locality. As for someone undertaking a journey without the intention being the attainment of a specific locality or worship at that specific locality, then the prohibition in the hadîth will not be applicable to him.
The three mosques mentioned in the hadîth are permitted as specific places to which a person can intend a journey of worship, since the reward for worshipping at these three localities is multiplied. If a person travels to al-Masjîd al-Harâm with the added intention of performing `umrah, then that will be for him illumination upon illumination.
Source: Islam Today
-- Al Arabiya Digital