It did not take long for Qin to strike back, capturing Xinyuan (新垣) and Quyang (曲陽) from Wei in 287 BC, and the former Wei capital Anyi (安邑) in 286 BC. In 283 BC, Qin allied with Zhao and attacked Wei again, capturing Ancheng (安城) with its vanguard reaching near the Wei capital Daliang (大梁). In 276 BC, King Zhaoxiang once again sent Bai Qi to attack Wei. The following year in 275 BC, he sent his uncle Wei Ran to attack Daliang and killed 40,000 Han reinforcements sent to relieve the siege, forcing Wei to concede eight forts from Wencheng (溫城). Wei Ran attacked Wei again in 274 BC, capturing four cities and killing 40,000 men. In 273 BC, Wei and Zhao allied together to attack the Han city of Huayang (華陽). King Zhaoxiang sent troops to relieve the siege, killing 130,000 Wei soldiers outside Huayang and drowning 20,000 Zhao prisoners, forcing Wei to seek an armistice as well as ceding Nanyang (南陽). Qin attacked Wei again in 268 BC and captured Huaicheng (懷城). In 266 BC, the Wei national Fan Ju (范雎) fled to Qin after being persecuted and tortured by the Wei chancellor, Wei Qi (魏齊), and vowed revenge upon his home state. He advised King Zhaoxiang about the strategy of "allying distant states while attacking nearby states" (遠交近攻). This advice impressed King Zhaoxiang so much that he appointed him as the chancellor of Qin. In 264 BC, King Zhaoxiang sent Bai Qi to attack Han, capturing nine cities including Xingcheng (陘城) and killing 50,000 of the enemy, enabling Qin to blockade the routes around southern Taihang Mountains. In 262 BC, Bai Qi attacked Han and captured Yewang (野王), cutting off the Shangdang region from the Han mainland. King Huanhui of Han was fearful of the Qin military prowess and decided to concede Shangdang, but the local commanders refused to do so and instead surrendered the region to the state of Zhao. The struggle for control of Shangdang triggered direct conflicts between Qin and Zhao, then the two largest military powers among the warring states, leading to the devastating Battle of Changping.