Kingdom of Dali
Shams al-Din was of an Iranian of Khwarezmian origin from Bukhara and Yunnan's first provincial governor. He was allegedly descended from 'Alī bin Abī Tālib and the Prophet, Sayyid Ajall's father was Kamāl al-Dīn and his grandfather was Shams al-Dīn 'Umar al-Bukhārī. He served the court of the Yuan dynasty at Yanjing (modern day Beijing). Later, he was in charge of Imperial finances in 1259, sent to Yunnan by Kublai Khan after conquering the Kingdom of Dali in 1274. After his death, Sayyid was given the posthumous name Zhongyi (忠懿). Later, the imperial court conferred the title "Prince of Xianyang" (咸陽王) and the posthumous name Zhonghui (忠惠) on him.