Passage: In 993, Khitans under General Xiao Sunning invaded Korea, but retreated after truce negotiations with minister Seo Hui of Goryeo, establishing friendly relations between the two nations. In 1004, the Liao dynasty repulsed Song China. Subsequently, as part of peace negotiations, Song China to paid tribute to the Liao emperor. However, the tension between Goryeo and Liao created another war. In 1009, General Gang Jo of Goryeo led a coup against King Mokjong, killing the king and establishing military rule. In 1010, the alliance was broken and Liao attacked Korea for General Gang's treason. Also, Khitans claimed six garrison settlements east of the Yalu River, which Goryeo claimed as its territory in truce negotiations during 993. After suffering numerous and heavy casualties against the Goryeo army, the Khitans managed to defeat Gangjo, who had begun to underestimate them. Despite this defeat, the Goryeo king managed to retain his claim on the six garrison settlements. The Khitans retreated from the peninsula, with no great prize for the war, but they did not give up their hope of gaining the six garrison settlements and making Goryeo pay tribute. However, beginning in the summer of 1018, the Khitans constructed a bridge across the Yalu River.
How many times did the Liao dynasty have violent conflict between 1000 and 1010? How many times was Korea attacked? How many years after the truce was the alliance broken? How many years passed between the Liao dynasty repulsing Song China and Liao attacking Korea? How many years passed since the Kitans invaded Korea to when the alliance was broken? How many years past since Khitans first invaded Korea to when they built a bridge over the Yalu River? What dynasty repulsed Song China? Which two nations became friendly after one invaded the other? Which two nations established friendly relations in 993? Which two rulers established friendly relations in 993?