however , despite the influence of diverse civilizations , certain features became characteristic of most mosques and thus serve to distinguish them from the sacred spaces of other religions and cultures , the most important of which is that a mosque must be oriented toward mecca .