In 1944, after Sheng switched his allegiance from the Soviet Union to the Nationalist Chinese regime, the Soviet Union responded by supporting a rebellion in Ili, which led to the creation of the Second East Turkestan Republic by Soviet trained Turkic-leaders. Sheng was forced to leave Xinjiang and accept a position with the Nationalist Chinese government in Chongqing. After heavy fighting between the Second ETR regime, which enjoyed Soviet military backing, and the Nationalist Chinese forces in Xinjiang, which were supplemented by the forces of the Hui warlord Ma Bufang in 1944–45, the Republic of China and Soviet Union reached an understanding, under which the Ili rebels agreed to dissolve the Second ETR and join a coalition provincial government with the Chinese Nationalists. The Ili rebels retained their autonomy and allegiance to the Soviet Union.