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. After an extended visit to France, where he received a great deal of attention from the press, he returned to Morocco and was exiled to the Dar el Makhzen (Sultanate Palace) in Tangier.