section_path: Military and foreign policy/Eastern regions
section_name: Eastern regions
paragraph_text: Eastern regions
  
  In East Asia, Tang Chinese military campaigns were less successful elsewhere than in previous imperial Chinese dynasties. Like the emperors of the Sui dynasty before him, Taizong established a military campaign in 644 against the Korean kingdom of Goguryeo in the Goguryeo–Tang War; however, this led to its withdrawal in the first campaign because they failed to overcome the successful defense led by General Yeon Gaesomun. Allying with the Korean Silla Kingdom, the Chinese fought against Baekje and their Yamato Japanese allies in the Battle of Baekgang in August 663, a decisive Tang–Silla victory. The Tang dynasty navy had several different ship types at its disposal to engage in naval warfare, these ships described by Li Quan in his Taipai Yinjing (Canon of the White and Gloomy Planet of War) of 759. The Battle of Baekgang was actually a restoration movement by remnant forces of Baekje, since their kingdom was toppled in 660 by a joint Tang–Silla invasion, led by Chinese general Su Dingfang and Korean general Kim Yushin (595–673). In another joint invasion with Silla, the Tang army severely weakened the Goguryeo Kingdom in the north by taking out its outer forts in the year 645. With joint attacks by Silla and Tang armies under commander Li Shiji (594–669), the Kingdom of Goguryeo was destroyed by 668.
  
  Although they were formerly enemies, the Tang accepted officials and generals of Goguryeo into their administration and military, such as the brothers Yeon Namsaeng (634–679) and Yeon Namsan (639–701). From 668 to 676, the Tang Empire would control northern Korea. However, in 671 Silla broke the alliance and began the Silla–Tang War to expel the Tang forces. At the same time the Tang faced threats on its western border when a large Chinese army was defeated by the Tibetans on the Dafei River in 670. By 676, the Tang army was expelled out of Korea by a unified Silla. Following a revolt of the Eastern Turks in 679, the Tang abandoned its Korean campaigns.
  
  Although the Tang had fought the Japanese, they still held cordial relations with Japan. There were numerous Imperial embassies to China from Japan, diplomatic missions that were not halted until 894 by Emperor Uda (r. 887–897), upon persuasion by Sugawara no Michizane (845–903). The Japanese Emperor Tenmu (r. 672–686) even established his conscripted army on that of the Chinese model, based his state ceremonies on the Chinese model, and constructed his palace at Fujiwara on the Chinese model of architecture.
  
  Many Chinese Buddhist monks came to Japan to help further the spread of Buddhism as well. Two 7th-century monks in particular, Zhi Yu and Zhi You, visited the court of Emperor Tenji (r. 661–672), whereupon they presented a gift of a south-pointing chariot that they had crafted. This 3rd century mechanically driven directional- compass vehicle (employing a differential gear) was again reproduced in several models for Tenji in 666, as recorded in the Nihon Shoki of 720. Japanese monks also visited China; such was the case with Ennin (794–864), who wrote of his travel experiences including travels along China's Grand Canal. The Japanese monk Enchin (814–891) stayed in China from 839 to 847 and again from 853 to 858, landing near Fuzhou, Fujian and setting sail for Japan from Taizhou, Zhejiang during his second trip to China.