We have a custom when a new masjid is built to invite the brothers from the different lands to attend the opening celebration. And there are some of us who said that the Prophet sallahu alayhi wa salam said: One should not undertake journeys except to three mosques: al-Masjid al-Haram (in Makkah), the Aqsa mosque, or this mosque (in Madinah). Does it enter into the prohibition if we go from one land to another country to attend the celebration for the new masjid? Benefit us may Allah reward you.
As for having a celebration for the opening of the masjid, (then this) was not from the habit of the Salaf. And if you want good and rectification for the ummah, then restrict yourself to what the Salaf of the Ummah were upon. Nothing will save the latter part of our Ummah except what saved the earlier part. And nothing saved the earlier part of this Ummah except excellence in following the Prophet salllahu alayhi wa salam. And abandoning innovation in religion. If the intend of attending this celebration is to draw near to Allah, then it is an innovation. If the intent is to attend for happiness, a hospitality, and guidance, or to donate for this new masjid or another masjid, then there is no harm in that. As for travelling which is prohibited, (it) is the one (in which) the traveller intends to draw near to Allah. (In regards to) travelling to a specific place to draw near to Allah by that place specifically, then this an innovation because the Prophet sallahu alayhi wa salam said:
لَا تُشَدُّ اَلرِّحَالُ إِلَّا إِلَى ثَلَاثَةِ مَسَاجِدَ: اَلْمَسْجِدِ اَلْحَرَامِ, وَمَسْجِدِي هَذَا, وَالْمَسْجِدِ اَلْأَقْصَى
One should not undertake journeys except to three mosques: al-Masjid al-Haram (in Makkah ), the Aqsa mosque, or this mosque (in Madinah)
[Agreed Upon (by Imaam Bukharee and Imaam Muslim]
As for other than these maasjid, it is not allowed for a person to travel for the place itself. As for travelling for a celebration, giving donation for something that is good, or to compete for an affair of Muslims are busy with, then there is no harm in this in Shaa Allaah nor prohibition.
Faisal Ibn Abdul Qaadir Ibn Hassan
Shaykh Abdul-Muhsin al-Abbaad was asked the following question:
What is the ruling on having a banquet for opening a masjid out of gratitude to Allah, the Exalted?
I do not know of any evidence to prove that.
[Sharh Ibn Majah no. 41]
Shaikh Yahya al-Hajoori hafidhuallah said:
“This opening of the masjid is an innovation. There is no evidence for it from the Prophet sallahu alayhi wa salam that he gathered the Companions to open his masjid. Likewise, the Companions radiallahu anhu throughout the lands of the dunya. They did not say, ‘come Abu Bakr, come Umar, come Uthman radiallahu anhum open for us masjid so and so.’ Likewise the Imams after them. All of this is an innovation because the masaajid resembles with what some of the ignorant ones do when opening a hotel or business or organizations and there is no evidence for it. They complete building the masjid and say we want Shaikh so and so to open the masjid with a lecture. This is an innovation and whoever does it after the evidence is clarified and continues upon it, then he becomes an innovator due to that.”
Likewise the Permanent Committee said:
“And like this it is not necessary for the likes of these celebrations and it is not recommended to call to it and aid in establishing it by giving money or other than it. For verily the best of guidance is in following the Salaf and evil is in the innovation of the Khalaf.”
[Fatawa al-Islaamiyyah (1/18)]
Faisal Ibn Abdul Qaadir Ibn Hassan