Muhammad was son to Lubb ibn Musa (and thus grandson to the famous Musa ibn Musa ibn Qasi), from the prominent Muwallad Muslim Banu Qasi clan, of Visigothic or Hispano-Roman extraction.
He had at least six sons, Lubb, Musa, Yusuf, Abd Allah, Yunus and Mutarrif.