In 1912, via the Treaty of Fez, France and Spain partitioned Morocco between them, with the northern littoral becoming Spanish Morocco (excluding Tangier, which later became an international zone) and the rest French Morocco (minus Ifni, which formed a Spanish exclave).