{
 "id": "polity/banu-abi-al-afiya",
 "class": "polity",
 "slug": "banu-abi-al-afiya",
 "label": {
  "ar": "بنو أبي العافية",
  "en": "Banu Abi al-Afiya"
 },
 "summary": {
  "ar": "بنو أبي العافية بن أبي نائل، بطن مكناسة الذين ملكوا تسول وجهات تازا وملوية ومليلة؛ ظهر أمرهم في عهد الأدارسة فمالؤوا يحيى بن إدريس ثم صالوا عليه وطردوه عن عمله، وعظم ملك موسى بن أبي العافية حتى دانت له فاس وأجلى الأدارسة عن المغرب في عباءة الدعوة الشيعية، ثم حاربه ميسور الخصي قائد القيروان فأجلاه إلى نواحي ملوية ووطاط، وعاد فيظهر دوماً في فتن المغرب وصراع زيري بن عطية وبلكين بن زيري عليه، ولم يزالوا في طاعة بني زيري ومظاهرتهم إلى أن ظهرت دولة المرابطين فزحف إليهم يوسف بن تاشفين وأهلكنا آخر رؤسائهم.",
  "en": "Banu Abi al-Afiya ibn Abi Na'il, the Miknasa branch that ruled Tasul and the Taza–Malwiyya–Melilla marches; first clients then scourges of the Idrisids — Musa ibn Abi al-Afiya drove them from Fez under the Fatimid da'wa, warred the eunuch Maysur, was driven into the desert and returned, and the house survived as Zirid clients until Yusuf ibn Tashfin's Almoravids destroyed its last chiefs."
 },
 "stub": false,
 "wings": [],
 "regions": [
  "maghreb"
 ],
 "periods": [
  "period/abbasid-fragmentation",
  "period/buyid-seljuk-fatimid-era"
 ],
 "tags": [],
 "aliases": [],
 "themes": [],
 "data": {
  "kind": "dynasty",
  "sources": [
   "source/tarikh-ibn-khaldun-ibar"
  ],
  "provenance": {
   "layer": "own-research",
   "source": "ابن خلدون، العبر — الخبر عن دولة بني أبي العافية ملوك تسول، ص1621-1622 (طبعة هيليوبوليس)",
   "generated_by": "Devin (SWE-2 High) from Apple Vision OCR",
   "model": "swe-2-high",
   "run": "lib-ibar-east-16"
  },
  "status": {
   "review": "draft",
   "completeness": 1,
   "generated_by": "Devin (SWE-2 High); extracted from Ibn Khaldun al-Ibar via Apple Vision OCR"
  }
 },
 "prose": {
  "ar": {
   "sections": [
    {
     "heading": "موجز",
     "markdown": "بنو أبي العافية بن أبي نائل بطن من مكناسة. يذكر ابن خلدون أنهم ملكوا تسول وجهات تازا وملوية ومليلة. {cite:tarikh-ibn-khaldun-ibar}"
    },
    {
     "heading": "أخبارهم",
     "markdown": "ظهر أمرهم في عهد الأدارسة. فمالؤوا يحيى بن إدريس، ثم صالوا عليه وطردوه عن عمله. {cite:tarikh-ibn-khaldun-ibar}\n\nعظم ملك موسى بن أبي العافية حتى دانت له فاس، وأجلى الأدارسة عن المغرب، وكان ذلك في ظل الدعوة الشيعية. ثم حاربه ميسور الخصي قائد القيروان، فأجلاه إلى نواحي ملوية ووطاط. {cite:tarikh-ibn-khaldun-ibar}\n\nظلوا في طاعة بني زيري ومظاهرتهم إلى أن ظهرت [[polity/almoravid-dynasty|دولة المرابطين]]. فزحف إليهم يوسف بن تاشفين وأهلك آخر رؤسائهم. {cite:tarikh-ibn-khaldun-ibar}\n\nيحتاج إلى مصدر إضافي: التواريخ، ومصدر ثانٍ غير ابن خلدون."
    }
   ],
   "frontmatter": {
    "id": "polity/banu-abi-al-afiya",
    "lang": "ar",
    "source_lang": "ar",
    "translators": []
   }
  },
  "en": {
   "sections": [
    {
     "heading": "Overview",
     "markdown": "Banu Abi al-Afiya ibn Abi Na'il are a branch of Miknasa. Ibn Khaldun says that they ruled Tasul and the districts of Taza, Moulouya and Melilla. {cite:tarikh-ibn-khaldun-ibar}"
    },
    {
     "heading": "Their history",
     "markdown": "Their affair rose in the time of the Idrisids. They first allied with Yahya ibn Idris, then turned on him and drove him out of his post. {cite:tarikh-ibn-khaldun-ibar}\n\nThe rule of Musa ibn Abi al-Afiya grew great, until Fez submitted to him and he drove the Idrisids out of the Maghrib, and this was in the shadow of the Shi'i call. Then Maysur the eunuch, commander of Kairouan, fought him and drove him back to the regions of Moulouya and Wattat. {cite:tarikh-ibn-khaldun-ibar}\n\nThey remained in obedience to the Zirids and in support of them until the [[polity/almoravid-dynasty|Almoravid state]] arose. Yusuf ibn Tashfin marched against them and destroyed their last chief. {cite:tarikh-ibn-khaldun-ibar}\n\nA second source is needed: the dates, and a second source other than Ibn Khaldun."
    }
   ],
   "frontmatter": {
    "id": "polity/banu-abi-al-afiya",
    "lang": "en",
    "source_lang": "ar",
    "translators": [
     "Claude Haiku 5.5 (claude-haiku-5-5), draft translation"
    ]
   }
  }
 },
 "degree": 0,
 "contemporaries": [],
 "connections": [],
 "related": [],
 "license": {
  "prose": "CC BY-SA 4.0",
  "data": "CC0 1.0"
 }
}