Cao Huan

On 4 February 266, he abdicated the throne in favour of regent Sima Yan (later Emperor Wu of the Jin dynasty), and brought an end to the Wei regime.

While Jiang Wei's attacks were largely easily repelled, Sima Zhao eventually ordered a counterattack on Shu with an invading force of 180,000 men commanded by Zhong Hui and Deng Ai.

After the fall of Shu, Deng Ai was framed for treason by Zhong Hui and stripped of command.

Shu's former territories (in present-day Sichuan, Chongqing, Yunnan, southern Shaanxi, and southeastern Gansu) were completely annexed by Wei.

Two days later, Cao Huan was located to Ye city, where he would live for the rest of his life.

He was buried with honours due an emperor and given the posthumous name "Yuan" by the Jin court.