We read in Verse 18 of Surah At-Tawbah: “Only those who believe in God, the Day of Judgment, perform their prayers, pay the religious tax, and have fear of God alone have the right to establish and patronize the mosque of God so that perhaps they will have the right guidance.”
Unqualified individuals do not have the right to repair or build mosques because it is a sacred task.
According to Hadiths, if an oppressor is building a mosque, Muslims should not help him.