Shortly after the unification of the region, the Western Jin dynasty collapsed. First the rebellions by eight Jin princes for the throne and later rebellions and invasion from Xiongnu and other nomadic peoples that destroyed the rule of the Jin dynasty in the north. In 317, remnants of the Jin court, as well as nobles and wealthy families, fled from the north to the south and reestablished the Jin court in Nanjing, which was then called Jiankang (建康), replacing Luoyang. It's the first time that the capital of the nation moved to southern part.