Who controlled Morocco?

Mainly France, but Spain controlled a small portion of it during the same time period.