The siege of Ansi was a battle between Goguryeo and Tang forces in Ansi, a fortress in the Liaodong Peninsula, and the culmination of the First campaign in the Goguryeo–Tang War. The confrontation lasted for about three months from 20 June 645 to 18 September 645.
The initial phase of combat resulted in the defeat of a Gorguryeo relief force of 150,000 and resulted in the Tang troops laying siege to the fortress. After a siege lasting around two months, the Tang forces constructed a rampart. However, the rampart was on the brink of completion, when a section of it collapsed and was taken over by the defenders. This, along with arriving Goguryeo reinforcements and the lack of supplies, forced Tang troops into a retreat. Over 20,000 Goguryeo troops were killed during the siege.
Background
In the year 644, Taizong of Tang decided to invade Goguryeo in the face of opposition inside the Tang dynasty. The assassination of Yongnu of Goguryeo and other officials by Yeon Gaesomun was used to justify invasion. For the next year, he began preparations for an invasion, preparing troops, ships, and siege engines, and conducting reconnaissance. On 1 April 645, under the pretext of marching to camp Huaiyuan, Tang forces led by Li Shiji suddenly turned to invade Goguryeo. They attacked several castles including Shin and Geonan, to throw the defense system of Goguryeo into disarray. The plan failed, and Li Shiji instead arrayed all Tang forces to besiege Gaemo on 15 April. Gaemo fell on 25 April. Simultaneously, naval forces led by Zhang Liang had landed in Liaodong Peninsula and went on to capture Bisa on 2 May. Meanwhile, Emperor Taizong of Tang joined the forces and they captured Yodong Fortress and Baegam one after another.
Afterwards, the Tang forces decided to attack Ansi Fortress, a fortress-city with a population of around 100,000, invading the fortress on 20 June. Texts of the Joseon dynasty describe the name of the chief of Ansi Fortress was said to be Yang Manchun. In response to the Tang invasion, Yeon Gaesomun, Generalissimo of Goguryeo, sent about 150,000 forces with Go yeon-su and Go hye-jin to rescue Ansi.
Development
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 Go Yeonsu and Go Hyezin, 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.
Assault on the Ansi fortress
The Tang first attacked Ansi Fortress with several siege weapons including catapults and battering rams. However Goguryeo repelled the attacks and repaired the ramparts each time. As a result, Taizong was furious and Li Shiji asked permission to massacre all the men and women if the fortress was captured, which was granted. After the ANSI people heard this, they defended the fortress more tenaciously, the Tang army's assaults were repelled several times. When the Ansi fortress attack came to a standstill, Tang was in a hurry so the Tang Army attacked the west side of the fortress as many as six or seven times per day. 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.