The period of division ended when the Sui Dynasty reunified China and almost destroyed the entire city, turning it into a small town