In the south , the retreat of the Song dynasty led to major demographic changes . The population of refugees from the north that resettled in Hangzhou and Jiankang ( modern Nanjing ) eventually grew greater than the population of original residents , whose numbers had dwindled from repeated Jurchen raids . The government encouraged the resettlement of peasant migrants from the southern provinces of the Song to the underpopulated territories between the Yangtze and the Huai rivers .