 Other minority ethnicities from China such as the Xianbei, Khitan, and Jurchen also migrated into the Korean peninsula.Fleeing from the Mongols, in 1216 the Khitans invaded Goryeo and defeated the Korean armies multiple times, even reaching the gates of the capital and raiding deep into the south, but were defeated by Korean General Kim Chwi-ryeo who pushed them back north to Pyongan, where the remaining Khitans were finished off by allied Mongol-Goryeo forces in 1219.These Khitans are possibly the origin of the Baekjeong.