Hyeonjong of Goryeo (1 August 992 – 17 June 1031, r. 1009–1031) was the 8th ruler of the Goryeo dynasty of Korea. He was a grandson of King Taejo. He was appointed by the military leader Gang Jo, whom the previous King Mokjong had called upon to destroy a plot by Kim Chi-yang. In 1010, the Khitan attacked again during an internal Goryeo power struggle. Hyeonjong was forced to flee the capital temporarily and directed the court to move far south to the port city of Naju. In the end, Goryeo repulsed the Khitan and forced them to withdraw from the Korean land. In 1019, when Goryeo continued to refuse to submit or return the northern territories, the Khitan attacked once more. Goryeo generals, including Gang Gam-chan, were able to inflict heavy losses on the Khitan army in the Battle of Kwiju. The Khitan withdrew without achieving their demands and never again invaded Goryeo. Both the Liao Dynasty and Goryeo enjoyed a time of peace, and their cultures were at their height. Meantime, Hyeonjong ordered the compilation of the Tripitaka Koreana, which was 6,000 volumes. It is the act of carving the woodblocks that was considered to be a way of bringing about a change in fortune by invoking the Buddha's help. Father: Anjong of Goryeo (고려 안종) Grandfather: Taejo of Goryeo (고려 태조) Grandmother: Queen Sinseong (신성왕후) Mother: Queen Dowager Hyosuk (효숙왕태후) Grandfather: Daejong of Goryeo (고려 대종) Grandmother: Queen Seonui (선의왕후) Consorts and their Respective issue(s): Queen Wonjeong of the Seonsan Kim clan (원정왕후 김씨; d. 1018); half first cousin once removed – No issue. Queen Wonhwa of the Gyeongju Choi clan (원화왕후 최씨); half first cousin once removed. Princess Hyojeong (효정공주) Princess Cheonsu (천수전주) Wang Su (왕수) Queen Wonseong of the Ansan Kim clan (원성왕후 김씨; d. 1028) Crown Prince Wang Heum (태자 왕흠) Wang Hyeong, Prince Pyeongnyang (왕형 평량군) Queen Inpyeong (인평왕후) Princess Gyeongsuk (경숙공주) Queen Wonhye of the Ansan Kim clan (원혜왕후 김씨; d. 1022) Wang Hwi, Prince Nakrang (왕휘 낙랑군) Wang Gi, Duke Pyeongnyang (왕기 평량공) Queen Hyosa (효사왕후) Queen Wonyong of the Jeongju Yu clan (원용왕후 유씨); half first cousin once removed – No issue.