Born in Fez, Moulay Muhammad was a son of the Alawite sultan Abd al-Rahman of Morocco.
After the defeat, with his father's permission, Moulay Muhammad used his capacity as army chief to launch on a series of significant military reforms in 1845 [REF].