that he captured. In 307, along with his cousin Liu Cong and Wang Mi, he attacked Luoyang, but was repelled. They were again foiled in 309. Liu Yao was probably created the Prince of Shi'an in 309, when Liu Yuan declared himself the emperor. During Liu Cong's and Liu Can's reigns After Liu Yuan's death in 310, Liu Cong overthrew his older brother and Liu Yuan's successor Liu He (after Liu He had tried to have him and the other brothers killed and successfully killed two) and succeeded to the throne himself as Emperor Zhaowu. He trusted Liu Yao greatly and commissioned him with a large force, and Liu Yao served his cousin faithfully. In 311, Liu Yao, in conjunction with Wang, Shi Le, and Huyan Yan, captured Luoyang and Emperor Huai of Jin. He took Emperor Huai's sister-in-law, the deceased Emperor Hui's wife, Yang Xianrong, as his own wife. Later that year, after Liu Cong's son Liu Can captured Chang'an, Liu Yao was put in charge of the Chang'an region, although he subsequently lost that city to Jin forces under Qu Yun (麴允), allowing the Jin prince Sima Ye (Emperor Huai's nephew) to occupy that city and subsequently declare himself emperor (as Emperor Min of Jin) in 313 after Liu Cong executed the former Jin emperor. In 312, while fighting Liu Kun the Jin governor of Bing Province (并州, modern central and northern Shanxi) and his ally Tuoba Yilu the Duke of Dai in conjunction with Liu Can, Liu Yao suffered a serious injury and was almost captured or killed by Jin forces, but was able to escape after the general Fu Hu (傅虎) yielded his own horse and sacrificed his own life in doing so. For the next few years, Liu Yao fought largely inconclusive battles against Jin forces, both those directly under Emperor Min and those under Sima Bao the Prince of Nanyang. However, in 316, after Emperor Min's forces collapsed and Sima Bao failed to come to his aid, Liu Yao captured Chang'an and Emperor Min (whom Liu Cong subsequently executed in 318). For this accomplishment, Liu Cong created him the greater title of Prince of Qin. Late in Liu Cong's reign, Liu Cong grew increasingly cruel and extravagant, as well as increasingly trusting eunuchs and the treacherous official Jin Zhun. In 318, as Liu Cong grew ill, he summoned Liu Yao and Shi Le to