The mosque is strategically placed on the high south bank of the Bu Regreg river to provide an imposing spectacle visible for miles around. Since the area surrounding was suburban at the time of construction and lacked the population to regularly fill the mosque, historians have been led to believe that it was meant to serve the Almohad troops who gathered here before setting off on campaigns and possibly even to serve double-duty as both a place of worship and as a fortress.