Two days after the Japanese surrender in the Pacific, independence leaders Sukarno and Hatta declared Indonesian independence and were appointed president and vice-president respectively of the new Republic. Suharto disbanded his regiment under orders from the Japanese command and returned to Yogyakarta. As republican groups rose to assert Indonesian independence, Suharto joined a new unit of the newly formed Indonesian army. Based on his PETA experience, he was appointed deputy commander, and subsequently, a battalion commander when the republican forces were formally organised in October 1945. Suharto was involved in fighting against Allied troops around Magelang and Semarang and was subsequently appointed the head of a brigade as lieutenant-colonel, having earned respect as a field commander. In the early years of the War, he organised local armed forces into Battalion X of Regiment I; Suharto was promoted to Major and became Battalion X's leader.