In May 1921 Sun was elected "extraordinary president" by a rump parliament despite protests by Chen and Tang Shaoyi, who complained of its unconstitutionality. Tang left while Chen plotted with the Zhili clique to overthrow Sun in June 1922 in return for recognition of his governorship over Guangdong. After Chen was driven out of Guangzhou, Sun returned again to assume leadership in March 1923. The party was reorganized along Leninist democratic centralism, and the alliance with the Communist Party of China came to be known as First United Front. The Guangzhou government focused on training new officers through the newly created Whampoa Military Academy. In 1924, the Zhilii clique fell out of power, and Sun travelled to Beiping to negotiate terms of reunification with leaders from Guominjun, Fengtian and Anhui clique. He was unable to secure the terms as he died in March 1925 from illness. Power struggles within the KMT ensued after the death of Sun. The Yunnan–Guangxi War broke out as Tang Jiyao tried to claim party leadership. In the north, there were struggles led by Guominjun against Fengtian-Zhili alliance from November 1925 to April 1926. The defeat of Guominjun ended their reign in Beiping. Chiang Kai-shek emerged as the protégé of Sun Yat-sen following the Zhongshan Warship Incident. In the summer of 1926, Chiang and the National Revolutionary Army (NRA) began the Northern Expedition with the hopes to reunify China. Wu Peifu and Sun Chuanfang of the Zhili clique were subsequently defeated in central and eastern China. In response to the situation, the Guominjun and Yan Xishan of Shanxi formed an alliance with Chiang to attack the Fengtian clique together. In 1927, Chiang initiated a violent purge of Communists in the Kuomintang, which marked the end of the First United Front. Though Chiang had consolidated the power of the KMT in Nanking, it was still necessary to capture Beiping (Beijing) to claim the legitimacy needed for international recognition. Yan Xishan moved in and captured Beiping on behalf of his new allegiance after the death of Zhang Zuolin in 1928. His successor, Zhang Xueliang, accepted the authority of the KMT leadership, and the Northern Expedition officially concluded. The politics of the Nanjing Decade of Kuomintang leadership over China were deeply shaped by the compromises with warlords that had allowed the victory of the Northern expedition.