The Banu 'l-Ukhaidhir (Arabic: بنو الأخيضر) was a dynasty that ruled in Najd and al-Yamamah (central Arabia) from 867 to at least the mid-eleventh century. An Alid dynasty, they were descendents of Muhammad through his daughter Fatimah and his grandson Al-Hasan, and at least one contemporary traveler describes them as having been Shi'ites of the Zaydi persuasion. Their capital was known as al-Khidhrimah, which lay near the present-day city of Al-Kharj in Saudi Arabia.
The founder of the dynasty was Muhammad ibn Yusuf al-Ukhaidhir ibn Ibrahim ibn Musa al-Djawn ibn Abd Allah al-Kāmil ibn Al-Hasan al-Mu'thannā bin Al-Hassan al-mujtaba bin Ali al Murtaza bin Abi Talib. Muhammad's brother Isma'il had launched a rebellion in the Tihamah in 865 against the Abbasid government and temporarily occupied the city of Mecca. After Isma'il's death the following year, Muhammad began stirring up trouble along the road running between the Hejaz and Iraq, but was defeated by the road's governor Abu 'l-Saj Dewdad. Fleeing from the government forces, he made his way in al-Yamamah and established himself there in 867.
Al-Yamamah at the time was nominally part of the Abbasid Caliphate, but the central government had largely neglected the area for years due to its remoteness. With the exception of the occasional raid by government forces, the tribes there were largely self-governing. When Muhammad arrived in al-Yamamah, he likely gained the support of the Banu Hanifa, the largest tribe in the area, and created an independent amirate.