 By the time Abaoji assumed control over the Khitans in the early tenth century , a majority of the Khitan population had adopted Buddhism . Buddhism was practiced throughout the length of the Liao dynasty . Monasteries were constructed during the reign of the first emperor , Taizu , and Buddhism was especially prominent during the reigns of Emperors Shengzong , Xingzong , and Daozong . 
