During the Three Kingdoms, the Kingdom of Wei founded by Cao Cao's son, controlled ten of the Han Dynasty's prefectures including You Prefecture and its capital Ji. Within the jurisdiction of You Prefecture were eleven commanderies, Fanyang, Yan Principality, Beiping, Shanggu, Dai, Liaoxi, Liaodong, Xuantu, Lelang, Changli and Daifang, which collectively ruled 60 counties. In 238, Sima Yi's Liaodong campaign against Gongsun Yuan extended the eastern reach of You to Liaodong. In 244-45, Guanqiu Jian launched the Goguryeo–Wei Wars against Goguryeo from Xuantu Commandery (modern-day Shenyang).