In 1911, rebellion broke out against the sultan. This led to the Agadir Crisis, also known as the Second Moroccan Crisis. These events led Abdelhafid to abdicate after signing the Treaty of Fes on 30 March 1912, which made Morocco a French protectorate. He signed his abdication only when on the quay in Rabat, with the ship that would take him to France already waiting. When news of the treaty finally leaked to the Moroccan populace, it was met with immediate and violent backlash in the Intifada of Fes. His brother Youssef was proclaimed Sultan by the French administration several months later (13 August 1912). At the same time a large part of northern Morocco was placed under Spanish control.