Duan Qirui (Chinese: 段祺瑞; pinyin: Duàn Qíruì; Wade–Giles: Tuan Ch'i-jui, pronounced ) (March 6, 1865 – November 2, 1936) was a Chinese warlord, politician and commander of the Beiyang Army who ruled as the effective dictator of northern China in the late 1910s. He was the Premier of the Republic of China on four occasions between 1913 and 1918, and from 1924 to 1926 he served as acting Chief Executive of the Republic of China in Beijing.
 A graduate of the Tianjin Military Academy, Duan studied military science in Germany and became a prominent artillery commander under Yuan Shikai. Following the Xinhai Revolution in 1911 and the fall of the Qing dynasty, he became minister of war and premier in the Yuan cabinet. He opposed Yuan's restoration of monarchy in China and, upon Yuan's death, continued as premier and took effective control of northern China. His tenure was marked by political infighting as well as conflict with southern parliamentarians under the leadership of Sun Yat-sen.
 In 1917, Duan took part in suppressing another attempt to restore the monarchy, and spearheaded China's involvement in the First World War on the side of the Allies. He also negotiated a series of loans with Japan, with which he built up the Anhui clique and prepared for a conquest of the south. His secret dealings with the Japanese (including the 1918 Sino-Japanese Joint Defence Agreement) later came to light which, along with the Treaty of Versailles's decision to transfer Shandong to Japan, paved way for the May Fourth Movement in 1919. His position weakened, Duan was eventually ousted from power after his defeat in the 1920 Zhili–Anhui War. He came out of retirement in 1924 to head Zhang Zuolin and Feng Yuxiang's Beiyang government, but was again deposed after Zhang's victory over Feng in the Anti-Fengtian War. Duan subsequently retired to Tianjin before settling in Shanghai, where he died in 1936.
 Born in Hefei as Duan Qirui (Chinese: 段啓瑞), his courtesy name was Zhiquan (Chinese: 芝泉). His grandfather was Duan Pei (Chinese: 段佩), an officer in Li Hongzhang's privately raised Huai Army (Huai Jun, Chinese: 淮軍). His father died early and he was raised by his maternal grandmother.
 In 1885 Duan Qirui entered Tianjin Military Academy (天津武備學堂), specializing in artillery, and graduated at the top of his class. After graduation, he was sent to Lüshun to oversee the construction of artillery fortifications and came to the attention of Li Hongzhang, who sent him to study military science in Germany for two years. After returning to China he was first named as a commissioner to the Beiyang Armory (北洋军械局) and then an instructor at Weihai military academy. Soon he was able to gain the sponsorship of Yuan Shikai, who named him an artillery commander in the New Army.
 Duan first saw action in the Boxer Rebellion, where he served Yuan in Shandong province and distinguished himself in combat against the Boxers. Yuan then gave him command over a Beiyang army division in 1904. In 1906 he was appointed director of the Baoding Staff College, which allowed him to begin recruiting his own clique of loyal junior officers. Yuan arranged for the marriage of his niece, whom he had adopted, to Duan in an effort to consolidate his power and solidify Duan's loyalty.
 After the outbreak of the Wuchang Uprising of 1911 against the Qing dynasty, Duan commanded the loyalist Second Army Corps against the revolutionary army in the Battle of Yangxia and succeeded in taking back Hankou and Hanyang. After Yuan Shikai altered the course of the Xinhai Revolution by forcing the emperor to abdicate, Duan supported him. For his loyalty Yuan appointed him military governor of both Hunan and Hubei provinces. He was further named to Yuan's cabinet as minister of war in 1912, then premier in 1913 while also keeping his position as war minister. Because he had publicly supported the Emperor's abdication while serving as an envoy of the central government in 1911, Duan's promotions were supported by the Kuomintang.
 Duan rose to power as a close ally of Yuan Shikai, but the two came to increasingly disagree with each other over various issues as time went on. One of the main problems was that Duan began to amass influence over the Beiyang Army as minister of war, thereby undermining Yuan's own control over the soldiers. Realizing his growing power, Duan became more independent and gradually challenged the President over appointments and reforms in the military. As both had volatile tempers, their quarrels became ever more heated, and Yuan eventually started to counter Duan's rise. Using Duan and the Beiyang Army's failure to suppress the Bai Lang Rebellion as reason, he initiated reforms to purge the military of Duan's followers and raise a new army which was supposed to be more capable than the Beiyang Army while also being loyal to Yuan himself. As Duan fell sick in late 1914, he was unable to stop the President's plans, and he was thus dismissed as minister of war in May 1915.
 Having expected to eventually succeed Yuan in the presidency, Duan thus came to oppose Yuan's attempt to declare himself Emperor in late 1915. After several provinces declared independence from Yuan's government, Duan tried to play the intermediary between the rebels and Yuan, just as Yuan had done during the Xinhai Revolution. Their friendship never recovered, even after Duan was given the premiership, partially because Yuan had shrewdly stripped that office of its powers. Duan served as premier intermittently from 1913 to 1918, under several governments, as part of a series of shaky coalitions (which often collapsed). Yuan's attempt to establish his own dynasty had destroyed the unity of China, and many provinces had achieved de facto independence from Beijing as early as 1915.
 In 1916, when Yuan Shikai was on his deathbed, he called several of the most important political and military figures in his government, including Duan, to hear his last political testament. Yuan was only able to say two words: "the Constitution", which no one was able to interpret. Yuan's 1914 constitution stipulated that, in the event of the impending death of China's president, the president would place the names of three men to potentially succeed him after his death. After his death, the box would be opened and one of the men named would be elected.
 Yuan died on June 6, 1916. When the box was opened, Duan Qirui, Li Yuanhong and Xu Shichang were named.  None initially wanted to take the presidency. Duan consulted with other senior military leaders of northern China, calculated that Li was the weakest and least popular of the three and then successfully pressured him to take the presidency, possibly under the rationale that a weak, unpopular president would be easier to manipulate. Duan served under Li as premier, but dominated him—and the rest of the government—and ruled for a time as the effective dictator of northern China, challenged mostly by semi-independent warlords. Neither Duan nor Li ever attempted to submit Li's appointment as president to a parliamentary or general election, indicating Duan's general contempt for constitutional reform.
 Duan Qirui, in his appointment as Premier, refused to recognize the old 1912 constitution. He was opposed by both President Li Yuanhong and Vice President Feng Guozhang, the second most important Beiyang military commander after Duan himself. On June 15, 1917, the admiral of the Chinese First Fleet, Li Tingxin, along with China's most senior naval commanders issued a statement supporting the 1912 constitution and threatened to ignore orders from Beijing if the constitution was not restored, declaring their solidarity with the "National Protection Army" in the southwest, which also claimed to support the constitution. Eventually Feng was able to persuade Duan to relent and the dissident government in the south agreed to dissolve itself when Parliament was reconvened. Nevertheless, the parliament and the country remained as divided as ever between north and south. Duan and the other Beiyang leaders refused to be dictated to by southern parliamentarians, composed mostly of Sun Yat-sen's Guangdong-based Kuomintang party, backed by southern armies outside Beiyang control. Duan decided to take action against southern military commanders by reassigning them to other posts and thereby breaking their control. In order to do this he decided to oust the pro-Kuomintang military commander of Hunan; however, his cabinet refused to do so. In spite of this, Duan's right-hand man and Cabinet Secretary, Xu Shuzheng, issued orders on his own initiative to launch an attack on Hunan.
 In Europe World War I had reached a crucial point by 1916–17. Duan saw an opportunity to ingratiate China with the European powers and the US by declaring on the side of the Allies against Central powers. However, Duan was opposed again by both the president and vice-president, along with most of the parliament. He was impatient to gain parliament's approval through negotiation and resorted to bullying tactics with organized mobs. In response, president Li Yuanhong in May 1917 dismissed Duan as premier after parliament had voted to ask for his resignation.
 At this juncture a monarchist general, Zhang Xun, marched his army into Beijing and announced the restoration of the Qing dynasty on July 1, 1917. Outraged, the other Beiyang generals, led by vice-president Feng Guozhang, mobilized their forces and ended the short-lived restoration attempt. Duan was returned to power while Li Yuanhong, having had enough of Beiyang politics, resigned the presidency. A few days later, on August 14, 1917, China entered the First World War on the side of the Allies.  Duan declared war on Germany and Austria-Hungary Empire and took back Germany's settlement and Austria Hungary's settlement in Tianjin. By entering the war, Duan hoped for some quid pro quo from China's new allies, such as the cancellation of many of the indemnities and concessions that China had been forced to sign in the past. He also hoped that China could gain international prestige by involving itself in "The Great War".
 
Duan's strategy now was to negotiate financial loans with Japan, in exchange for concessions, to fund a military buildup for the conquest of the south. The political cover for this army was the entry of China into the First World War. With the poor state of the government's credit and European wartime expenses making both Western and domestic financing impossible, he secretly negotiated the first of the Nishihara Loans with Japan on September 29, 1917. In exchange he offered Japan the right to station troops in Shandong province as well as the right to build and run two new Shandong railroads. There would be a high political price to pay when these negotiations came to light later on, but in the meantime Duan got the money for his army. This later became part of the reason for the Shandong Problem.
 After Feng Guozhang had restored him as premier, Duan Qirui quickly began preparations to mobilize troops for conquest of the south. The south responded by forming another rival government against the north and organizing the Constitutional Protection Movement. Duan dispatched two former subordinates of Feng Guozhang to the south to conquer Hunan, the linchpin of central China; one of these commanders was Wu Peifu. Wu supported Feng's preference for peaceful reconciliation with the south and refused to fight. Embarrassed by this fiasco, Duan was forced to resign a second time as premier in November 1917.
 Nevertheless, Duan still exercised enormous influence in Beijing due to the various military commanders who were still loyal to him. Feng Guozhang was forced to reappoint him to the cabinet as Minister of War, and once again Duan dispatched troops to the south. He also ordered Zhang Zuolin, military ruler of Manchuria, to send troops to Beijing as a ploy to further pressure Feng to restore him to the premiership. However, Wu Peifu once again refused to follow his orders to invade the southern provinces. Faced with the threat from Feng Guozhang, Cao Kun and Wu Peifu's coalescing "Zhili clique," Duan attempted to strengthen his position by forming his own political party called the "Anhui clique." He also used the funds from the Nishihara Loans to build up his military forces, employing Japanese officers to train his troops.
 President Feng Guozhang's term expired on October 10, 1918; in an attempt to placate the south, he agreed not to seek re-election provided Duan also vacate the office of premier on the same day. Duan's position was also weakening as rumours of his secret dealings with the Japanese began to surface. When the Nishihara Loans were exposed, along with the secret treaty between the Allies and Japan to transfer Shandong to the Japanese, at the Versailles peace conference, Beijing and the rest of the nation exploded in protest in what came to be known as the "May Fourth Movement" on May 4, 1919. Duan's rivals Cao Kun and Wu Peifu of the Zhili clique moved to corner him by organizing an alliance of military leaders, including Zhang Zuolin, who opposed Duan. They also engineered the dismissal of Duan's key subordinate Xu Shuzheng on July 4, 1919. In retribution, Duan forced the new president to dismiss both Cao and Wu even though there was no possible way to actually remove them from their posts. He also renamed his army the "National Pacification Army" and mobilized them for war with the Zhili clique and its supporters.
 Aisin Gioro Puyi was restored to the Emperor's throne at the Forbidden City by the warlord and Qing loyalist Zhang Xun in July 1917, and ordering his army to keep their queues in loyal service to the Qing emperor. However, there was extensive opposition across China to return to imperial monarchy, and as a show of force, Duan Qirui ordered a Caudron Type D aircraft, piloted by Pan Shizhong (潘世忠) and bombardier Du Yuyuan (杜裕源) from Nanyuan airbase to drop three bombs over the Forbidden City, causing the death of an eunuch, but otherwise minor damage. This is the first recorded instance of aerial bombardment by the early-Republican era Chinese Air Force
 The conflict came to be known as the Zhili–Anhui War and lasted from July 14 to July 18, 1920. Although Duan's army had been equipped and trained by Japan, it succumbed easily to Wu Peifu-led Zhili forces and their allies. His military power shattered, Duan fled to a Japanese settlement in Tianjin and became an apartment landlord. The Anhui clique began to lose its coherency, as some of its members became affiliated with either the Zhili clique or Zhang Zuolin's Fengtian faction. Only Zhejiang remained in the hands of the Anhui clique, although it eventually fell in 1924. Shandong was allowed by the Zhili clique to later be taken over by an Anhui warlord under strict conditions of neutrality. Nevertheless, some Anhui clique politicians remained active in government as the Zhili clique and Fengtian faction began to maneuver against each other. Jin Yunpeng, who had been a protege of Duan, was appointed premier in August 1920. Other Anhui members secretly mediated between Zhang Zuolin and Feng Yuxiang, an important leader in the Zhili clique, when the latter decided to revolt against his former allies in the Second Zhili–Fengtian War.
 Feng Yuxiang's defection resulted in the defeat of Wu Peifu and the Zhili clique and forced them to withdraw to the south. The victorious Zhang Zuolin unpredictably named Duan Qirui as the new Chief Executive of the nation on November 24, 1924. Duan's new government was grudgingly accepted by the Zhili clique because, without an army of his own, Duan was now considered a neutral choice. In addition, instead of "President" Duan was now called the "Chief Executive," implying that the position was temporary and therefore politically weak. Duan Qirui called on Sun Yat-sen and the Kuomintang in the south to restart negotiations towards national reunification. Sun demanded that the "unequal treaties" with foreign powers be repudiated and that a new national assembly be assembled. Bowing to public pressure, Duan promised a new national assembly in three months; however he could not unilaterally discard the "unequal treaties," since the foreign powers had made official recognition of Duan's regime contingent upon respecting these very treaties. Sun died on March 12, 1925, and the negotiations fell apart.
 With his clique's military power in a shambles, Duan's government was hopelessly dependent on Feng Yuxiang and Zhang Zuolin. Knowing that those two did not get along, he secretly tried to play one side against the other. On March 18, 1926, a protest march was held against continued foreign infringement on Chinese sovereignty and a recent incident in Tianjin involving a Japanese warship. Duan dispatched military police to disperse the protesters, and in the resulting melee 47 protesters were killed and over 200 injured, including Li Dazhao, co-founder of the Communist Party. The event came to be known as the March 18 Massacre. The next month Feng Yuxiang again revolted, this time against the Fengtian clique, and deposed Duan, who was forced to flee to Zhang Zuolin for protection. Zhang, tired of his double-dealings, refused to restore him after re-capturing Beijing. Most of the Anhui clique had already sided with Zhang. Duan Qirui exiled himself to Tianjin and later moved to Shanghai where he died on November 2, 1936.
 Duan gained a reputation as tough and authoritarian, but without a great love for public office. He was observed to have a "Buddhist inclination", and enjoyed solitude. He delegated great authority to his subordinates, and generally supported their decisions.  His chief professional interest was the training of soldiers.  In government, he favored a cabinet system, in which decisions were made among a small group of powerful men, rather than either the one-man dictatorship favored by Yuan Shikai or the open, consultative form of government proposed by Sun Yat-sen.
 Duan was also well known as a player and patron of weiqi (Go). He usually won because his opponents feared defeating him, with the exception of his son-in-law, who was also a patron of weiqi and was not afraid of defeating his father-in-law. Duan had four daughters.  After Duan's retirement from politics he became a devoted Buddhist, built a worship hall within his own home and prayed every morning. Many of his former subordinates frequently came to pray with him. On the first and the 15th days of each month (lunar calendar), Duan would go to temples to participate in various Buddhist events. He supposedly became a vegetarian after the March 18 Massacre to repent for his involvements in the massacre. Douchi was his favorite food and was served at every meal. Duan also kept a hen farm at home to provide him with eggs, but kept no roosters, as he claimed that without fertilization, the eggs remained vegetarian.