After agreeing to sign the Boxer Protocol, the government initiated unprecedented fiscal and administrative reforms, including elections, a new legal code, and abolition of the examination system. Sun Yat-sen and other revolutionaries competed with constitutional monarchists such as Kang Youwei and Liang Qichao to transform the Qing Empire into a modern nation. After the deaths of the Guangxu Emperor and Cixi in 1908, the hardline Manchu court alienated reformers and local elites alike by obstructing social reform. The Wuchang Uprising on 10 October 1911 led to the Xinhai Revolution. General Yuan Shikai negotiated the abdication of Puyi, the last emperor, on 12 February 1912, bringing the dynasty to an end.