gone to study in China in 589, also returned with emissaries in 600. The monk Damyuk (hangul:담육, hanja:曇育) also went to study under the Sui dynasty in 596, with emissaries and gifts sent from King Jinpyeong. These emissaries to China including Buddhist monks were continuously sent during King Jinpyeong's reign, and the two countries remained on amicable terms. In 608, when Silla was under attack from Baekje and Goguryeo, King Jinpyeong asked for the Sui's aid, with requests written by the monk Wongwang. Sui complied and joined forces with Silla in their attacks of Goguryeo, and in 613 Emperor Yang of Sui sent emissaries to Silla who participated in Buddhist ceremonies held by Monk Wongwang at Hwangnyong Temple. Diplomatic relations with China continued throughout the Sui dynasty and the following Tang dynasty. Gifts were sent with emissaries to Tang in 621 and the Emperor Gaozu sent silks, folding screens of art with an official statement in return. These diplomatic relations continued in the following years and Silla used this relation for asking for Tang's assistance against Goguryeo. Emperor Gaozu of Tang sent governors to both Silla and Goguryeo in 626 to bring about a truce between the two countries, albeit briefly. Conflicts with Baekje and Goguryeo Although King Jinpyeong focused on reinforcing defense by building forts and fortresses and strengthening the military system, Silla was in constant conflict with its two neighbors, Baekje and Goguryeo. In 602, Baekje troops attacked the fortress Amak (hangul:아막성, hanja:阿莫城) but were turned back, and in 603 Gogguryeo attacked the fortress at Bukhansan (hangul:북한산성, hanja:北漢山城) but were defeated when King Jinpyeong himself joined the battle. Baekje continued with their attacks in 605, as did Goguryeo. King Jinpyeong sent the monk Wongwang to Sui with a request for aid against these attacks in 608. The aid from Sui came after Silla had lost many people and fortresses, and ultimately the joined forces failed in deterring Goguryeo attacks. Conflicts with Baekje escalated in 611, when they attacked the fortress of Gajam (hangul:가잠성, hanja:椵岑城) and claimed it after a brutal battle of 100 days. Ongoing attacks included one on the fortress of Mosan (hangul:모산성, hanja:母山城) in 616, Neuknohyeon (hangul:늑노현, hanja:勒弩縣) in 623, and the three fortresses of Sokham (hangul:속함성, hanja:速含城), Gijam (hangul:기잠성, hanja:歧暫城), and Hyeolchaek (hangul:혈책성, hanja:穴柵城)in 624. In 626 Baekje attacked the fortress of Jujae (hangul:주재성, hanja:主在城), and two additional fortresses were taken with many people taken