developed. From the Battle of Baideng (200 BC) to the Battle of Mayi (133 BC), the Han dynasty was forced to uphold a marriage alliance and pay an exorbitant amount of tribute (in silk, cloth, grain, and other foodstuffs) to the powerful northern nomadic Xiongnu that had been consolidated by Modu Shanyu. After the Xiongnu sent word to Emperor Wen of Han (r. 180–157) that they controlled areas stretching from Manchuria to the Tarim Basin oasis city-states, a treaty was drafted in 162 BC proclaiming that everything north of the Great Wall belong to nomads' lands, while everything south of it would be reserved for Han Chinese. The treaty was renewed no less than nine times, but did not restrain some Xiongnu tuqi from raiding Han borders. That was until the far-flung campaigns of Emperor Wu of Han (r. 141–87 BC) which shattered the unity of the Xiongnu and allowed Han to conquer the Western Regions; under Wu, in 104 BC the Han armies ventured as far Fergana in Central Asia to battle the Yuezhi who had conquered Hellenistic Greek areas. The Koreans and Japanese during the Chinese Tang dynasty (618–907 AD) looked to the Chinese capital of Chang'an as the hub of civilization and emulated its central bureaucracy as the model of governance. The Japanese sent frequent embassies to China in this period, although they halted these trips in 894 when the Tang seemed on the brink of collapse. After the devastating An Shi Rebellion from 755 to 763, the Tang dynasty was in no position to reconquer Central Asia and the Tarim Basin. After several conflicts with the Tibetan Empire spanning several different decades, the Tang finally made a truce and signed a peace treaty with them in 841. In the 11th century during the Song dynasty (960–1279), there were shrewd ambassadors such as Shen Kuo and Su Song who achieved diplomatic success with the Liao dynasty, the often hostile Khitan neighbor to the north. Both diplomats secured the rightful borders of the Song dynasty through knowledge of cartography and dredging up old court archives. There was also a triad of warfare and diplomacy between these two states and the Tangut Western Xia dynasty to the northwest of Song China (centered in modern-day Shaanxi). After warring with the Lý dynasty of Vietnam from 1075 to 1077, Song and Lý made a peace agreement in 1082 to exchange the