After a long conference in Algeciras to decide the future of Morocco, it was later agreed that the French “would have special responsibility for restoring order along the Algerian-Moroccan border,” gained Morocco. (Article: The First Moroccan Crisis of 1905)
Then, the Moroccan police force was to be controlled both by the French and the Spanish by a Swiss Inspector General.