Following Allied occupation of Jakarta, Indonesian Republicans moved their capital to the city if Yogyakarta exposing armed units in the city to civilian political intrigue. President Sukarno’s decision to commence negotiations with the Dutch was opposed by various Indonesian factions, which formed into the ‘’ Persatoean Perdjoangan’’ (“Union of Struggle”) group led by communist, Tan Malaka. Persatoean Perdjoangan’s opposition to negotiation with the Dutch received sympathy from many sections of the armed forces, including its commander Sudirman and Major-General
On 27 June, Indonesian Army units under Sudarsono released Malaka and followers from prison in Surakarta. The Prime Minister, Sutan Sjahrir who was leading the negotiations with the Dutch, was arrested the same night in Surakarta and taken to the Sultan's Palace with other figures. Meanwhile, Sudarsono's troops occupied the city of Yogyakarta. Indonesian president, Sukarno declared martial law and demanded Sjahrir's release. Troops loyal to Sukarno advanced on Surakarta from Surabaya; and the loyal Siliwangi division sent troops to Yogyakarta. Adam Malik and other young radicals were arrested.
On 2 July, Sudarsono and Muhammad Yamin visited Sukarno and demanded that Sjahrir be replaced by communist leader Malaka. Sjahrir, supposedly still a captive, surprised everyone by walking into the room, and Sukarno ordered the arrest of Sudarsono and Yamin. On 3 July army units released Malik from jail and demanded that Sudirman be put in charge of security. The government was re-organised by Sjahrir to include Muhammad Natsir, Amir Sjarifuddin, the Sultan of Yogya, Agus Salim, and Djuanda, and the army’s Division III was restructured.