Geographer Yu Qin (1284–1333) also served as an official in Jinan and authored his geography book Qi Cheng there. When Shandong province was established under the Ming dynasty, Jinan became its capital. Jinan was the site of a siege during the Jingnan Campaign where the city was defended by loyalists of the Jianwen Emperor led by Tie Xuan against the rebel Prince of Yan Zhu Di's army. In 1852, the northward shift of the Yellow River into a new bed close to the city triggered the modern expansion of Jinan. The new course of the Yellow River connected the city to the Grand Canal and regional waterways in northern Shandong and southern Hebei. German influence in Jinan grew after the Qing dynasty ceded Qingdao to the German Empire in 1897. A German concession area was established to the west of the historical city center (in the vicinity of the Jinan Railway Station first established by the Germans). The Jiaoji (Qingdao–Jinan) railway was built by the Germans against local resistance. Discontent over the construction of the railway was one of the sources fueling the Boxer Rebellion (1899–1901). During the rebellion, foreign priests were evacuated from Jinan and Chinese Christians became a target of violence. The Jiaoji railway was completed in 1904, three years after the Boxer Rebellion had been put down, and opened the city to foreign trade. The importance of Jinan as a transportation hub was cemented with the completion of the north–south Jinpu railway from Tianjin to Pukou in 1912. Jinan became a major trading center for agricultural goods in northern China. Traded commodities included cotton, grain, peanuts, and tobacco. Jinan also developed into a major industrial center, second in importance to Qingdao in the province. Republican era In 1919, after World War I, the Japanese took over the German sphere of influence in Shandong, including control of the Jiaoji railway, and established a significant Japanese influence in Jinan. According to estimates by a contemporary Japanese government official, about 2,000 Japanese were living in Jinan in 1931, about half of whom were involved in the opium trade for which the Japanese had a loosely controlled monopoly that was exploited with the participation of Chinese traders. During the Warlord era of the Republic of China, Zhang Zongchang, nicknamed the "Dogmeat General", ruled Shandong from Jinan for a period that lasted from April 1925 until May 1928. Zhang was unpopular for