On February 12, 1912, Hsuan-T'ung, the last emperor of China, is forced to abdicate following Sun Yat-sen's republican revolution. A provisional government was established in his place, ending 267 years of Manchu rule in China and 2,000 years of imperial rule. The former emperor, only six years old, was allowed to keep up his residence in Beijing's Forbidden City, and he took the name of Henry Pu Yi. Pu Yi was enthroned as emperor in 1908 after his uncle, the Kuang-hsu emperor, died. He reigned under a regency and underwent training to prepare him for his coming rule. However, in October 1911, his dynasty fell to Sun Yat-sen's revolution, and four months later he abdicated. The new Chinese government granted him a large government pension and permitted him to live in the imperial palace until 1924, when he was forced into exile. After 1925, he lived in Japanese-occupied Tianjin, and in 1932 Japan created the puppet state of Manchukuo in Manchuria under his rule. In 1934, Henry Pu Yi was enthroned as K'ang Te, emperor of Manchukuo. Despite guerrilla resistance against his puppet regime, he held the emperor's title until 1945, when he was captured by Soviet troops. In 1946, Pu Yi testified before the Tokyo war crimes tribunal that he had been an unwilling tool of the Japanese and not, as they claimed, an instrument of Manchurian self-determination. Manchuria and the Rehe province were returned to China, and in 1950 Pu Yi was handed over to the Chinese communists. He was imprisoned at Shenyang until 1959, when Chinese leader Mao Zedong granted him amnesty. After his release, he worked in a mechanical repair shop in Peking.