In 1912 the Treaty of Fez was signed and Morocco became a French Protectorate, while Spain controlled the north of Morocco. The capital was moved again, this time to Rabat, which remains the capital to this day. Morocco regained independence from France and Spain in 1956.[1]