The Song dynasty is divided into two distinct periods: Northern Song and Southern Song. During the Northern Song (Chinese: 北宋; 960–1127), the Song capital was in the northern city of Bianjing (now Kaifeng) and the dynasty controlled most of what is now Eastern China. The Southern Song (Chinese: 南宋; 1127–1279) refers to the period after the Song lost control of its northern half to the Jurchen-led Jin dynasty in the Jin–Song Wars. During this time, the Song court retreated south of the Yangtze and established its capital at Lin'an (now Hangzhou). Although the Song dynasty had lost control of the traditional "birthplace of Chinese civilization" along the Yellow River, the Song economy was still strong, as the Southern Song empire contained a large population and productive agricultural land. The Southern Song dynasty considerably bolstered its naval strength to defend its waters and land borders and to conduct maritime missions abroad. To repel the Jin, and later the Mongols, the Song developed revolutionary new military technology augmented by the use of gunpowder. In 1234, the Jin dynasty was conquered by the Mongols, who took control of northern China, maintaining uneasy relations with the Southern Song. Möngke Khan, the fourth Great Khan of the Mongol Empire, died in 1259 while besieging the mountain castle Diaoyucheng, Chongqing. His younger brother Kublai Khan was proclaimed the new Great Khan, though his claim was only partially recognized by the Mongols in the west. In 1271, Kublai Khan proclaimed himself Emperor of China and established the Yuan dynasty. After two decades of sporadic warfare, Kublai Khan's armies conquered the Song dynasty in 1279, after the Southern Song suffered military defeat in the Battle of Yamen. The Mongol invasion eventually led to a Chinese reunification under the Yuan dynasty.