The corruption of the high command and ineffectiveness of military strength was soon revealed once the Song made a joint effort with the Jurchen people to conquer the Khitan Liao dynasty (916–1125). After the successful rebellion of the Jurchens against their Khitan masters, the Jurchen observed the weakness of the Song army and broke their pact, then attacked the Song as well. By 1127, the capital at Kaifeng was captured and northern China overrun, while the remnants of the Song court fled south to Hangzhou and established the Southern Song. This was a crucial blow to the Song military elites, as they had been closely tied to the political structure until 1127; afterwards they became alienated from the emperor and the Song court. Although they had lost northern China to the new Jurchen Jin dynasty (1115–1234), this loss prompted the Song to make drastic and lasting military reforms. Emperor Gaozong, desperate to refill the decimated ranks of the central army, drafted men from all over the country. This had been done before, but not on the same scale. In the tenth and eleventh centuries only the most skilled soldiers became imperial guardsmen, while under Gaozong entire central army units were composed of soldiers from every region and background. The Southern Song eventually recovered their strength and commanded the loyalty of vaunted commanders such as Yue Fei (1103–1142), who successfully defended the border at the Huai River. The Jurchens and Song eventually signed a peace treaty in 1141.