The Indian Army during British rule, also referred to as the British Indian Army, was the main military force of India until national independence in 1947. Formed in 1895 by uniting the three Presidency armies, it was responsible for the defence of both British India and the princely states, which could also have their own armies. As stated in the Imperial Gazetteer of India, the "British Government has undertaken to protect the dominions of the Native princes from invasion and even from rebellion within: its army is organized for the defence not merely of British India, but of all possessions under the suzerainty of the King-Emperor." The Indian Army was a vital part of the British Empire's military forces, especially in World War I and World War II.
The Indian Presidency armies were originally under East India Company command, and comprised the Bengal Army, Madras Army, and Bombay Army. After the Indian Rebellion of 1857, all company troops were transferred to the British Crown. In 1879, the Presidency armies were integrated into a system of four Commands with a central Commander-in-Chief. On 1 April 1895, the Presidency armies were dissolved and unified into a single Indian Army, also divided into four Commands, and the term "Indian Army" was officially used by 1903. The Commands were later replaced by two "Armies" in 1908—the Northern and Southern Army—but the Command system was restored in 1920.
About 1.5 million Indian soldiers served during the First World War. The Indian Expeditionary Forces deployed to France, Belgium, east Africa, Iraq, Egypt, and the Gallipoli peninsula, among other regions. Eleven Indian soldiers won the Victoria Cross in the war. During the Second World War some 2.5 million soldiers served, and the Indian Army became the largest volunteer army in history to that point. India itself also served as a key logistical base for Allied operations in World War II.
The force is also sometimes referred to as the Army of the Indian Empire, or Imperial Indian Army. The Indian Army should not be confused with the Army of India, which was the Indian Army plus the British Army in India (British units sent to India). With the partition of India and Pakistan into two new Dominions on 15 August 1947, the army was reconstituted and divided between the newly independent countries, with the process overseen by Field Marshal Sir Claude Auchinleck. Independent India would, however, retain "much of the organizing framework" of the army.