Mosques are opened by praying in them and maintaining them with the remembrance of Allaah (dhikr), reading Qur’aan, glorifying and praising Allaah, declaring His Oneness, teaching knowledge of sharee’ah, and other things that will show respect to the place. Allaah says (interpretation of the meaning):
“In houses (mosques) which Allaah has ordered to be raised (to be cleaned, and to be honoured), in them His Name is remembered [i.e. Adhaan, Iqaamah, Salaah (prayers), invocations, recitation of the Qur’aan]. Therein glorify Him (Allaah) in the mornings and in the afternoons or the evenings,
Men whom neither trade nor sale (business) diverts from the remembrance of Allaah (with heart and tongue) nor from performing As-Salaah (Iqaamat-as-Salaah) nor from giving the Zakaah. They fear a Day when hearts and eyes will be overturned (out of the horror of the torment of the Day of Resurrection).
That Allaah may reward them according to the best of their deeds, and add even more for them out of His Grace. And Allaah provides without measure to whom He wills”[al-Noor 24:36-38]
In these ways and others, by offering religious advice, exhortation and consultation, the Messenger of Allaah (peace and blessings of Allaah be upon him) used to maintain the mosque, and he was followed in that by the Rightly-Guided Khaleefahs and by all his Sahaabah and the guided imams after him (may Allaah be pleased with them and have mercy on them). All goodness resides in following their guidance and adhering to their example in opening mosques and maintaining them as they did, with acts of worship and other symbols of Islam. It was not narrated that the Prophet (peace and blessings of Allaah be upon him) or any of the guided imams opened a mosque with celebrations or invitations like those that people do nowadays, gathering from all over the country when the building is complete to honour it. If that was a praiseworthy action, then the Messenger of Allaah (peace and blessings of Allaah be upon him) would have been the first of people to do it and he would have prescribed it as Sunnah for his ummah, and the Rightly-Guided Khaleefahs and guided imams who came after him would have done it too. And if that had happened, it would have been reported.
On this basis, these celebrations should not be held. It is not recommended to invite people to such events or to help with them by giving money or in other ways. All good resides in following those who went before (the salaf) and evil resides in following those who came later. The fact that one of the Sahaabah invited the Messenger of Allaah (peace and blessings of Allaah be upon him) to his house to pray two rak’ahs in one part of it so that the owner of the house could take that as a prayer-place for praying whatever he could of naafil prayers does not form evidence to support the modern practice of holding celebrations to open mosques, because he (the Sahabi) did not invite the Prophet (peace and blessings of Allaah be upon him) to a celebration, rather he invited him to pray, and he did not travel in order to offer that prayer. Moreover, travel to attend this celebration or to pray in that mosque comes under the general meaning of the prohibition on traveling to pray in mosques other than the three famous mosques [i.e., al-Masjid al-Haraam in Makkah, al-Masjid al-Nabawi in Madeenah and Masjid al-Aqsa in al-Quds/Jerusalem]. So we should shun this innovated practice and be content – with regard to mosques and other matters – with the things that were done at the time of the Messenger of Allaah (peace and blessings of Allaah be upon him) and the guided imams who followed him (may Allaah have mercy on them).