Sayyid Ajall Shams al-Din Omar al-Bukhari (سید اجل شمسالدین عمر بخاری; ; 1211–1279) was Yunnan's first provincial governor, appointed by the Mongol-led Yuan dynasty of China. Shams al-Din was of Central Asian Iranic origin, being a Muslim Khwarezmian from Bukhara (in present-day Uzbekistan). When Genghis Khan attacked the city during the war between the Khwarizmi Shah and the Mongols, Sayyid Ajall Shams al-Din Omar's family surrendered to him. He was allegedly descended from Ali ibn Abi Talib 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ī. According to Marshall Broomhall, Shams al-Din, "who was a native of Bokhara, is said to have been a descendant of Mohammed (twenty-seventh generation)." Sayyid participated in Mongke Khan's conquest of Sichuan and was in charge of logistics. 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. The Yuanshi gives many biographies of distinguished Muslims in the service of the Mongols. A number of them occupied high offices. In chap, cxxv, we find the biography of 赛典赤·赡思丁 Sai-dien-ch'i shan-sse-ding, called also 烏馬兒 Wu-ma-r. He was a Hui-hui and a descendant of the 别菴伯爾 Bie-an-bo-r. In his country Sai-dien-ch'i has the same meaning as 貴族 (noble family) in Chinese. There is a long biography of Sai-dien-ch'i. Sayyid Ajall founded a "Chinese style" city where modern Kunming is today, called Zhongjing Cheng. He ordered that a Buddhist temple, a Confucian temple, and two mosques be built in the city. Advocating Islam, Christianity, Buddhism, Daoism and Confucianism was part of the Mongolian religious policy. The Confucian temple that Sayyid Ajall built in 1274, which also doubled as a school, was the first Confucian temple ever to be built in Yunnan.