ANSWER:

This is up to the evaluation of the muslim judge.

Generally speaking, it is permissible to sell the masjid and buy with that a bigger masjid that would serve the community better. 

Sheikh,May Allah gives you good health. The Masjid in our Community (Toronto, Canada) was established in 1999 and since then its been very active masjid however run out of space on Fridays but not during regular five time prayers. Now Masjid management wants to sell masjid to buy a bigger space 1KM away. Old Masjid will be sold to City for Metro. Is it permissible in sharia to sell.

Rulings on mosques |