Muhammad was born in Córdoba. His reign was marked by several revolts and separatists movements of the Muladi (Muslims of ethnic Iberian origin) and Mozarabs (Christians living in the Muslim controlled areas).

The Banu Qasi Muladi family, led by Musa ibn Musa, allied with the Arista family of the Kingdom of Navarre, and rebelled, proclaiming himself "third king of Spain" (after Muhammad and Ordoño I of Asturias). The rebel Umayyad officer Ibn Marwan returned to Mérida and also rebelled against the emir who, unable to quench the revolt, allowed him to found a free city (Badajoz, in what is now the Spanish region of Extremadura) in 875. Finally, Toledo rebelled with the support of Ordoño I, but was defeated in the battle of Guazalete.