After the Xinhai Revolution of 1911–1912, the rebels established a republican Provisional Government in Nanjing under President Sun Yat-sen and Vice President Li Yuanhong.
Since they only controlled southern China, they had to negotiate with the commander of the Beiyang Army, Yuan Shikai, to put an end to the Qing dynasty.
On 10 March 1912, Yuan became provisional president while located in Beijing, his power base.
He refused to move to Nanjing, fearing further assassination attempts.
It was also more economical to keep the existing Qing bureaucracy in Beijing, so the provisional senate moved north as well; the government thereby began its administration from Beijing on 10 October 1912.

The 1912–1913 National Assembly elections gave over half the seats and control of both houses to Sun's Nationalist Party (KMT).
The second-largest party, the Progressives led by Liang Qichao, generally favored Yuan.
Song Jiaoren was expected to become the next premier, but he riled Yuan by promising to pick a cabinet with only KMT ministers.
He was assassinated less than two weeks before the assembly convened.
An investigation pinned the blame on Premier Zhao Bingjun, which suggested Yuan had played a part.
Yuan denied that either he or Zhao killed Song, but the Nationalists remained unconvinced.
Yuan then took out a huge foreign loan without parliament's consent.
Sun led a faction of Nationalists against Yuan in a Second Revolution during the summer of 1913 but suffered complete defeat within two months.
After the Xinhai Revolution of 1911–1912, the rebels established a republican Provisional Government in Nanjing under President Sun Yat-sen and Vice President Li Yuanhong. Since they only controlled southern China, they had to negotiate with the commander of the Beiyang Army, Yuan Shikai, to put an end to the Qing dynasty. On 10 March 1912, Yuan became provisional president while located in Beijing, his power base. He refused to move to Nanjing, fearing further assassination attempts. It was also more economical to keep the existing Qing bureaucracy in Beijing, so the provisional senate moved north as well; the government thereby began its administration from Beijing on 10 October 1912.
The 1912–1913 National Assembly elections gave over half the seats and control of both houses to Sun's Nationalist Party (KMT). The second-largest party, the Progressives led by Liang Qichao, generally favored Yuan. Song Jiaoren was expected to become the next premier, but he riled Yuan by promising to pick a cabinet with only KMT ministers. He was assassinated less than two weeks before the assembly convened. An investigation pinned the blame on Premier Zhao Bingjun, which suggested Yuan had played a part. Yuan denied that either he or Zhao killed Song, but the Nationalists remained unconvinced. Yuan then took out a huge foreign loan without parliament's consent. Sun led a faction of Nationalists against Yuan in a Second Revolution during the summer of 1913 but suffered complete defeat within two months.
Beiyang government