Wanyan Aguda (1068-1123), of the Wanyan clan of the Jurchens, was the founding emperor of the Jin dynasty (Jurchen), temple name Taizu. The Jurchens had long suffered tribute demands and oppression from the Liao; on succeeding as chief of the tribal confederation, Aguda in 1114 sworn his two thousand five hundred men against Liao and won against the odds at Ningjiangzhou and Chuhedian. In 1115 he proclaimed himself emperor and founded the state of Jin with its capital at Huining (the Upper Capital), creating the meng'an mouke system that reorganized the tribal fighting men into a combined military-social organization, and ordering Wanyan Xiyin to fashion a Jurchen large script after the model of the Chinese and Khitan scripts. Year after year he pressed the war on Liao, took Huanglong prefecture, and at the Battle of Hudaigang shattered the main Liao field army — Liao never recovered. He also made the Alliance Sealed on the Sea with the Northern Song, agreeing to attack Liao in concert, so that Song and Jin power now met face to face. Aguda died of illness on campaign against Liao; his brother Wanyan Sheng finished Liao off, and in 1127 carried off the two Song emperors — the Jingkang catastrophe. The century-long Jurchen rule of northern China, facing the Southern Song across the Huai, was all built on his foundations.