Gyeonggi-do has been important since King Onjo of Baekje (one of the three kingdoms of ancient Korea) built Wiryeseong and founded the government in it. After King Taejo of Goryeo made the capital in Gaegyeong, (now Kaesong), the province became much more important, and since King Hyeonjong's period it has been called Gyeonggi.