After the Japanese surrender to the Allies and Proclamation of Indonesian Independence in 1945, on 3 October Nyak Arif was chosen to be the first resident of Aceh. In this position he oversaw the Japanese withdrawal from Aceh after refusing the Allies the right to do so; despite clashes with some Japanese troops in Bireuën, they were eventually all disarmed and returned to their homeland. On 17 January 1946 he was declared a titular major general while he served as a staff member to the Sumatran military commander.