The Emirate of Nekor or Şālihid Emirate (Arabic: إمارة بني صالح, romanized: ʾImārat Banī Ṣāliḥ) was an Arab emirate centered in the Rīf area of present-day Morocco. Its capital was initially located at Tamsāmān, and then moved to Nekor. The ruling dynasty was as of Himyarite Arab descent. The emirate was founded in 710 CE by Şālih ibn Mansūr through a Caliphate grant. Under his guidance, the local Berber (Amazigh) tribes adopted Islam, but later deposed him in favor of one Dāwūd al-Rundī (unlikely to have been a native of Ronda) from the Nafza tribe. They subsequently changed their mind and reappointed Şālih ibn Mansūr. His dynasty, the Banū Şālih, thereafter ruled the region until about 1015.
Several successive political entities controlled the Rīf In the period between the 8th and 14th centuries. The Emirate of Nekor, established at the beginning of the 8th century, ended with the destruction of its capital city Nekor in 1080. The area was integrated subsequently into the dominions of the Almoravids, and then those of the Almohads and the Marīnids.