The Treaty of Tangiers was signed on October 1844,[1] whereby Morocco officially recognized Algeria as part of the French Empire. The advent of the treaty came after the defeat of Morocco in the First Franco-Moroccan War (6–14 August 1844). A second treaty in 1860 forced Morocco to cede Sidi Ifni to the Spanish Empire .