The Song dynasty (宋朝: 960 -1279) was the last dynasty of China before the modern dynastic period beginning with the invasion of the Mongols. The Song often came into conflict with the contemporaneous Liao, Western Xia, and Jin dynasties in northern China, and was never able to reunite China after the collapse of the Tang. In spite of that, China during this time grew very wealthy, and enjoyed many technological advancements.