(It was not clear whether she was his wife or concubine by this point — Liu Yao had an earlier wife, Princess Bu, who was described as having died and having been princess when her son Liu Yin was created the Prince of Yong'an in 323.) Liu Yao, as the trusted cousin of the Han Zhao emperor Liu Cong, had many military responsibilities and was in charge of the Chang'an region after he captured it and Emperor Huai's successor Emperor Min in 316. In 318, after the Han Zhao prime minister Jin Zhun massacred the Han Zhao imperial family and nobles in the capital Pingyang (平陽, in modern Linfen, Shanxi) after a coup, the officials who fled from the massacre offered the throne to Liu Yao, who accepted.