 Justan is first mentioned in 865, when he was placed on the Justanid throne by his suzerain, the Alid ruler Hasan ibn Zayd, who had deposed Justan's brother Khurshid because of his hostility towards the Alids.In 866/7, Justan fought against the Abbasid governor of Ray, 'Abd-Allah ibn 'Aziz.Justan won over the latter and kill and capture many inhabitants of the city.