Muhammad ibn Idris

Muhammad bin Idris bin Idris bin Abdullah (محمد بن إدريس بن إدريس بن عبد الله) was the third Idrisid sultan of Morocco.

Life
He was the oldest of the twelve sons of Idris II. Upon the death of his father in 828, acting on the advice of his grandmother he divided the Idrisid realm among his older brothers, keeping only the capital, Fes, for himself. This weakened his authority and immediately gave rise to civil war and the decline of the Idrisid dynasty.

When the fourth brother, Isa, ruler of Wazeqqur, revolted against Fes, Muhammad sought the assistance first of Qasim, ruler of Tangier, but was refused. He then turned to Umar, ruler of the Rif Mountains, who defeated both Isa and Qasim, receiving in return the governorship over Tangier. The descendants of Umar and of Qasim would later rival for the leadership of the Idrisid realm after Muhammad's line went extinct.

Muhammad died in March/April 836 in Fes, and was buried there. He was succeeded by his son, Ali, who was only nine years old at the time.