 Emperor Taizong ordered Li Shiji to bait the Koreans with 15,000 troops, while Zhangsun Wuji's concealed troops would ambush them from behind.On the following day, the two sides clashed and Emperor Taizong inflicted a crushing defeat on the confused Koreans, inflicting 20,000 casualties and capturing 36,800 prisoners.Emperor Taizong then laid siege to Ansi Fortress; his troops attacked the Korean fortress as many as six or seven times per day, but were repelled each time by the defenders.