page_title: Rif
section_title: History
hierarchical_section_title: Rif / History
context_page_description: The Rif or Riff is a geographical and cultural region in northern Morocco.
  The Rif region is mountainous and has some fertile plains, and stretches from Cape Spartel and Tangier in the west to Berkan and the Melwiyya River in the east and from the Mediterranean in the north to the Wergha river in the south.
  It is separated into Eastern Rif, Central Rif and Western Rif.
context_section_description: The Rif has been inhabited by Berbers since prehistoric times. As early as the 11th century BC, the Phoenicians began to establish trading posts, with approval of or partnership with the local Berbers and started interbreeding thus starting a Punic language, on the Mediterranean and Atlantic coasts, and founded cities such as Tetouan, Melilla (Rusadir) and, in the 5th century BC, Tangier (called Tingi, back then). Later the Phoenician power gave way to an independent Carthage city-state, as the major power in the region. After the Third Punic War, Carthage was supplanted by Rome, and the Rif became part of the province of Mauretania. When the latter was divided during the rule of Emperor Claudius, Tangier became the capital of Mauretania Tingitana. In the 5th century AD, the region was raided by the Vandals, and Roman rule came to an end. The region remained under Vandal control until the 6th century AD when the Byzantines reconquered parts of it.
  In 710, Salih I ibn Mansur founded the kingdom of Nekor in the Rif and Berbers started converting to Islam. Berber Muslim kingdoms started establishing more cities. By the 15th century, many Spanish Moors were exiled from Spain and most of them settled in Western Rif, bringing their culture, Andalusian music, and even establishing the city of Ashawen or Chefchaouen (Accawen meaning "horns" in Berber). Since then, the Rif has suffered numerous battles between Berber kingdoms, Spain and Portugal. In 1415, Portugal invaded Ceuta (Sebta), and in 1490 Spain invaded Melilla (Mlilt). There was a period of peace afterwards, but war between Spain and Morocco broke out again in 1859 in Tetouan, where Morocco was defeated. The Spanish-Moroccan conflicts continued in the 20th century, under the leadership of Abd el-Krim, the Berber guerrilla leader who proclaimed the Republic of the Rif in 1921. The Riffian Berbers won several victories over the Spanish in the Rif War of the 1920s before being eventually defeated. The region was added to Morocco's reign by Spain in April 1956, a month after the former gained its independence from France.
caption: Flag of the Rif Republic (1921–1926)