The Wei army fled Handan in response to reports of a Qi attack on their capital Daliang and was defeated by Qi forces at Guiling, in modern Changyuan County.