Ismail, the sultan of Morocco around 1700 died in 1727, and when he died he left 500 sons behind. This led to big conflicts about who was going to ascend to the throne after him. The whole nation Morocco fell because of this insecurity. The arab power was weak and while the arab power declined Europe (Spain & Portugal) gained control of many ports in northern Morocco. This turned around once and Europe's power decreased but in the 1800s the pressure from Europe on Morocco increased. In 1904 France and Spain saw thir area of influence in Morocco. France claimed the biggest part of the country and Spain wanted the northern parts. Germany didn't like this. The big powers had a meeting in Spain. Morocco was still independent but Spain and France still thought that they would have special treatment and claimed their requests on Morocco.
Conflicts rose up in Morocco about the influence from Europe and therefore France sent in troops to keep the people calmed down. The people in Morocco got furious.
In 1912, the treaty of FÃÂ©s was signed. Morocco was the last North African nation that hadn't fallen under colonial rule, but now it happend. This treaty gave France the control and Morocco was no longer an independent country, it became a French protectorate.
The north part of Morocco was an exception because that was under spanish control. They had control over about a third of Morocco's territory.
There was an agreement between France and the Moroccan sultan Muhanmmed V. France was going to run the foreign politics and the armed forces, the Moroccan defences. This was going to take place in co-operation with the sultan, at least, that was what they said. France was also going to take part...