After the end of the Seven Years' War, France turned its attention to Barbaresque pirates, especially those of Morocco, who had taken advantage of the conflict to attack Western shipping.[17] The French fleet failed in the Larache expedition in 1765.[17]