Role in WW2
Main article: History of Morocco § Opposition to European control
Most of Morocco was a protectorate of France during World War II. When France was defeated, Morocco came under the control of the Vichy regime, and therefore was nominally on the side of the Axis powers, although an active resistance movement operated. In November 1942, it was invaded by the Allies as part of Operation Torch. From that point, Moroccan volunteers (the Goumier) fought on the side of the Allies.
A small area in northern Morocco, Spanish Morocco, was a Spanish protectorate and remained neutral throughout the war, as did the international city of Tangier.