In 923, Later Liang's rival
Later Tang's emperor
Li Cunxu, who claimed to be the legitimate successor to Tang and viewed Later Liang as an illegitimate usurper state, launched a surprise attack on the Later Liang capital
Daliang, capturing it. Zhu Zhen committed suicide, ending Later Liang and allowing Later Tang to take over its territory. Li Cunxu believed that a number of Later Liang officials from aristocratic families, who served Later Liang despite their families' long allegiance to the Tang state, should be exiled for what he viewed as disloyalty. Yao Yi was one of the ones targeted, and he was exiled to Fu Prefecture (復州, in modern
Tianmen,
Hubei) to serve as the military advisor to its prefect. However, he was recalled from exile after about a year, Subsequently, he served successively as deputy minister of defense (兵部侍郎,
Bingbu Shilang), deputy minister of civil service affairs (吏部侍郎,
Libu Shilang), and
Shangshu Zuo Cheng (), one of the secretaries general of the executive bureau (尚書省,
Shangshu Sheng). It was said that Yao was not a capable chancellor. One example was his involvement in the selection of officials for civil service. The old Tang system was that the ministry of civil service affairs (吏部,
Libu) would select officials in three stages, with the minister of civil service affairs handling one stage and each of the two deputy ministers handling one stage; an official would only be commissioned after going through the three stages. Late in Li Siyuan's reign, then-chancellor
Feng Dao advocated merging the three stages into one—arguing that, at that time, the Later Tang realm was no longer as large in territory or population as the unified Tang, such that only several hundred officials were to be selected each year, and that the three-stage selection process was time-wasting and inefficient. Li Siyuan thus merged the three stages into one, and have the minister and deputy ministers of civil service affairs select officials together. When Yao and Lu became chancellors, they again divided the process into three stages, such that it became drawn out again. The candidates were stuck with nothing to do during the selection process, and they often tried to intercept chancellors in public to complain. Yao did nothing about it, and Li Congke had to intercede himself and abolish the three-stage process again. == During Later Jin ==