Idris I of Morocco

Idris (I) ibn Abdallah (), also known as Idris the Elder () was a Hasanid and the founder of the Idrisid dynasty in part of northern Morocco, in alliance with the Berber tribe of Awraba. He ruled from 788 to 791. He is credited with founding the dynasty that established Moroccan statehood and is regarded as the "founder of Morocco".
History.
Idris was the great-grandchild of Hasan, who was the son of Fatimah and Ali and grandson of the Islamic prophet, Muhammad. His paternal half-brothers Muhammad al-Nafs al-Zakiyya and Ibrahim had been killed by the Abbasids during an abortive rebellion. His brother Yahya ibn Abdallah rose in revolt in Daylam, but was forced to surrender. He was persecuted by Caliph Harun al-Rashid thereafter, and repeatedly imprisoned.
Idris himself had participated (along with Yahya) in another Alid uprising in 786, under al-Husayn ibn Ali al-Abid. After the revolt's defeat at the Battle of Fakhkh, he escaped and remained in hiding, before moving to Egypt. Assisted by the local head of the caliphal postal system, Wadih, he managed to leave Egypt and reach the Maghreb.
In 789 he arrived in Walīla, the site of the Roman Volubilis. Here his headquarters have been discovered in recent excavations conducted by the Moroccan Institute of Archaeology (INSAP) and University College London. The headquarters lies just outside the walls of the Roman town, which was then occupied by the Berber tribe of the Awraba, under Ishaq ibn Mohammed. He married Kenza, of the Awraba, fathering a son, Idris II. This event is considered a consolidation and the birth of the Idrisid dynasty, the fourth Muslim State in Morocco after Nekor (710 - 1019), Barghawata (744 - 1058), and Midrar (757 - 976). According to Ibn Khaldoun, he was buried on the site. However, early in the Merinid period his tomb was discovered there, and moved to the town of Moulay Idriss near the hill of Zerhoun, where his tomb is found today. 
Idris I conquered large parts of northern Morocco, his son Idris II made Fez the capital city of the Idrisid dynasty. In 789 AD, he captured Tlemcen (in modern-day Algeria) which became part of the kingdom. This succession of events prompted vengeance from the Abbasid caliph Harun al-Rashid, who sent emissaries to kill him. Idris I was poisoned and died in 791. His son, Idris II, was brought up by the Awraba, and left Walīla for Fes in 808.