During the Indonesian struggle for independence (1945–1949),  prompted by political and military emergencies, the capital of the republic was moved several times, as the seat of the republic in exile during the war. The capital moved from Jakarta to Yogyakarta (1946–1948) and then to Bukittinggi (1948–1949) as the seat of the Emergency Government of the Republic of Indonesia. In 1949, the national capital of the republic returned to Jakarta.