In 661 BCE, Duke Xian of Jin lifted this prohibition by establishing the upper army; led by himself and the lower army; commanded by his son Shengshen. Jin's central army was established in the year of 633 BCE by Duke Wen of Jin. In 634 BCE, Duke Wen additionally formed three "ranks" (三行) with the purpose of defending against a Beidi invasion. The three ranks were later redeployed into the "New armies" (新軍). The new armies were largely dependent on the actual military necessity instead of being permanent units. Due to their flexibility, the new armies were sometimes omitted.