The battle to rescue Ansi On 20 July, the two sides descended into battle. The Tang dynasty sent
Li Shiji leading 15,000 infantry and cavalry to fight the Goguryeo army directly. But Tang general
Zhangsun Wuji led 11,000 elite cavalry across the canyon from the north of the mountain to hit the rear of Goguryeo forces. In the battle, Taizong personally led 4,000 infantry and cavalry to fight. The Tang army came out victorious in the end, decimating the Goguryeo forces. At least 20,000 Goguryeo soldiers were killed and 36,800 Goguryeo soldiers, including their generals Ko Yŏnsu and Ko Hyejin, surrendered. The Tang army captured 50,000 horses, over 50,000 cattle, and over 10,000 iron suits of armor. After the battle, Tang had succeeded in isolating Ansi fortress from other Goguryeo territory. One night, hundreds of Goguryeo soldiers climbed out of the fortress and attempted to attack the Tang army. When Taizong heard about it, he called up soldiers to make an emergency joint attack which killed dozens of Goguryeo soldiers, and the rest fled back to the fortress. It overlooked the city. Fu Fuai, one officer of the Tang Army, stationed his troops on the top of the rampart. However, Fu Fuai left the camp privately and the rampart suddenly fell, and the Goguryeo army occupied it. Taizong was very angry and put Fu Fuai to death. After that, Tang tried to regain the rampart for three days but failed. On the third day, the Goguryeo army reinforcements arrived and Taizong had still not captured the Ansi Fortress. In addition, because the battle was fought in the
Liaodong peninsula,
winter approached as early as October. This made the situation even worse for the Tang forces as the weather got considerably colder and food ran out, so the Emperor Taizong unavoidably ordered retreat. Taizong's retreat was difficult and many of his soldiers died as they were hit by a
snowstorm. Taizong himself tended to the injuries of his Turkic generals
Qibi Heli and
Ashina Simo, who were both wounded during the campaign against Goguryeo. ==Aftermath==