Initially formed with the name of the People's Security Army (TKR), then later changed to the Republic of Indonesia Army (TRI) before changing again its name to the Indonesian National Armed Forces (TNI) to the present. The Indonesian Armed Forces was formed during the Indonesian National Revolution, when it undertook a guerrilla war along with informal militia. As a result of this, and the need to maintain internal security, the Armed forces including the Army, Navy, and Air Force has been organised along territorial lines, aimed at defeating internal enemies of the state and potential external invaders.