In 386 the Tuoba Xianbei restored their state of Dai, at once renaming it Wei - the Northern Wei; in 439 Emperor Taiwu unified the north, facing the Southern dynasties across the divide of the Northern and Southern dynasties age. In 494 Emperor Xiaowen moved the capital to Luoyang: Chinese surnames taken, Xianbei dress banned, intermarriage urged, the equal-field system and the three-elders order installed - a sinicization that remade northern society. After the Six Garrisons revolt of 523 the realm split: Eastern Wei (then Northern Qi) in 534, Western Wei (then Northern Zhou) in 535, facing each other east and west. Emperor Wu of Northern Zhou persecuted Buddhism to strengthen the state and rebuilt the army on the fubing militia; in 577 he destroyed Northern Qi and reunified the north, preparing the Sui unification. In 581 Yang Jian received the Zhou abdication and founded the Sui; the Northern dynasties closed after nearly two hundred years.