Battle of Ansi

The siege of Ansi took place 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 the cold winter approaching as well as 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 give the name of the chief of Ansi Fortress as 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.

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 people of Ansi 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.

The Tang forces grew weary and considered the idea of bypassing the Ansi fortress to attack other parts of Goguryeo, which was rejected due to the threat Ansi posed to the advancing Tang forces. Under the leadership of Tang's prince Li Daozong, Tang forces attempted to build a rampart in the southeastern corner of the fortress, gradually approaching the wall. Meanwhile, the external wall was constantly razed by the garrison. Li Daozong was injured in the battle. The Tang used soldiers and an unknown number of laborers (possibly war captives) to build the rampart and the top of the rampart came to only a few feet away from 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 Tang 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
In 645, Emperor Taizong founded the Minzhong Temple, the oldest temple in Beijing, to commemorate his soldiers who died in Goguryeo. Emperor Taizong prepared another invasion in 648, but died, possibly due to an illness he contracted during his Goguryeo campaigns.

The Goguryeo forces lost over 20,000 people, with over 36,800 troops being taken prisoner during the early stage of combat. The casualties of the Goruryeo troops during the siege itself are unknown.

Tensions between Goguryeo and Tang continued, until Goguryeo was finally defeated by a joint Silla-Tang force in the year 668.

In popular culture
The 2018 South Korean film The Great Battle is based on this siege.