The first great test of relative strength among the growing Asian powers came in 598 AD, during a showdown between Koguryo and Sui China. Realizing that a Sui attack was imminent, King Yangwon ordered his warriors to secure strategic bases for the defense of Koguryo's western frontier. Koguryo went on the offensive and boldly stormed across the Liao River to assault the Liaoxi Fortress. Later that year, Emperor Wen massed his army and retaliated, but a combination of bad weather, outbreaks of disease, and fierce Koguryo troops inflicted devastating losses on the Sui armies. The tremendous suffering of the Chinese forced Emperor Wen to finally abandon his invasion in mid-campaign and withdraw.
Determined to protect his new empire and avenge the defeat of his father by Koguryo, Yang Di soon infused China with a new militaristic zeal. He earnestly began clearing his borders of all states that posed a potential threat to Chinese power. The Sui court had earlier accepted a Koguryo apology for its assault against the Liaoxi Fortress, but in 607 AD, the discovery of a Koguryo envoy in the camp of the Tujue Khan revived Chinese fears of a strong alliance among the northern tribes. Two years later Sui forces conquered Tibetan and Xianbei tribes in the western kingdom of Tuyuhun in northern Tibet. In the northeast, the Eastern Tujue acknowledged the suzerainty of Sui China. Emperor Yang successfully defeated the Mongols and Turks in the west and north and extended Chinese control as far south as Taiwan and Vietnam. Soon afterward, he redirected his attention to Koguryo.
The massive Chinese army advanced rapidly, moving southeast across the Yalu River and halting beneath the walls of P'yong'yang. Koguryo's General Ulchi Mundok, a skilled military tactician, accurately foresaw the possibility of an attack against P'yong'yang. Confident of his soldier's ability to defend the capital city, he carefully made plans to deal with an eventual Chinese retreat. He marshaled his troops in the area north of P'yong'yang along the Ch'ongch'on River to await the Sui army. Unable to take the city from its fierce defenders, the frustrated Chinese withdrew. On their fateful march northwest back to Liaodong, the entire Sui army walked headlong into a carefully laid and deadly ambush. In the calamitous battle that followed, General Ulchi's warriors mauled the Chinese with such sustained savagery that, according to Chinese annals, only 2,700 of the original force of 300,000 soldiers survived to make their way back to China. News of the disaster at the Ch'ongch'on River compelled Yang Di to lift the siege of the Liaodong Fortress and withdraw his entire force back into China proper. Between 612 and 614 AD, Emperor Yang sent a number of smaller armies against Koguryo, but Koguryo's battle prowess ended each expedition in the same disastrous manner.
The expense of these ruinous and bloody military campaigns against Koguryo seriously tarnished the prestige of the Sui Dynasty. Beginning in 613 AD, serious revolts broke out in China that not only handicapped Yang Di's Korean campaigns, but threatened the very survival of the Sui Dynasty itself.