# History of foreign relations of India (pre-1947)

India has maintained ties to the world for thousands of years, with periods of being conquered (generally through the northwest) increasing contact with the outside world toward the modern era.
In 1947, India became independent from British rule, and began executing its own foreign policy.

## Ancient era

Chandragupta Maurya founded the Maurya Empire, unifying most of India, in the aftermath of Alexander the Great's 4th century BCE conquests in northwest India. According to certain Greek sources, Maurya may have interacted with or at least been inspired by Alexander the Great. Maurya's adviser, Chanakya, wrote the Arthashastra, a treatise expounding concepts of statecraft such as the Rajamandala which were employed to deal with Indian and foreign affairs.
In South India, the Cholas maintained relations with China and had maritime influence around the eastern Indian Ocean.

## Indo-Muslim era

The Delhi Sultanate's conquest of India at the turn of the 13th century unified most of India under Islamic rule for the first time, and thus created new ties between India and the Muslim world. For example, several Central Asian elites came to India to escape Mongol attacks in the early 13th century, contributing to the rise of a unique yet cosmopolitan culture in Delhi.
Under the Mughal Empire, various regions of India began to focus on their relations with each other, rather than on neighbouring Afro-Eurasian regions.
India's relations with Africa saw several Africans come to India initially as slaves and traders; they often went on to play a significant role as bodyguards and political players in shaping Indian history. Malik Ambar was one such person who became a regional king and offered significant resistance to the Mughals. Western Europeans began coming to India in greater numbers after the 1490s and the Portuguese discovery of the sea route to India (see also: Britons in India).

## Colonial era

From the early days of the British East India Company's rise, they began the introduction of the European structure of maintaining civil supremacy over the military into South Asia. Colonial officials in British India, faced with an unprecedented task in governing an unfamiliar and vast land, often referred back to their own European history to adjudge how to leave a positive legacy behind in India. In deciding and justifying policy, they often made references to the impact of the Roman Empire in ancient Britain. British efforts in India also served as inspiration for administering other areas; for example, the Indian Penal Code went on to serve as the foundation for legal codes passed in several other British colonies, and dealings with the princely states served to inform later indirect rule over other parts of Africa and Asia.
India's centrality to the British Empire (comprising over 70% of its population even at its peak) shaped much of British foreign policy. The British Raj sought to guard the frontiers of India, annexing territory and maintaining peripheral buffer states which were important in shielding against rivals such as France early on, and during the Great Game, the Russian Empire; this elevated the concept of buffer states to international vogue in the 1880s, and led to concerns and interventions in places such as Persia, Afghanistan, and Tibet. The 1869 opening of the Suez Canal also saw faster transit between Europe and India, which led to further colonialism, along with anxieties around defending the new route.
Though concessions were made to the princely states in other areas, their foreign policy was handled entirely by the British. However, they were granted sovereignty over their airspace in 1931, and in general, their rulers often found ways to participate in intellectual or anticolonial networks outside of the subcontinent. For example, the American YMCA offered them an alternative vision to British programmes of physical fitness and sport (see also: Sport in British India and History of India–United States relations).
After World War I, Indians began to take on a larger role in the colony's foreign policy. They also began to author scholarship, inspired by nascent Western ideas of the time, around the Indian take on international relations. The contemporary Khilafat Movement also shaped the role of various Indian communities in engaging with the world, as it nurtured anticolonial sentiment but also increased the strength of South Asian Muslim nationalism. The resulting 1947 Partition of India, cleaving the Muslim- and non-Muslim-majority regions of British India, resulted in 15 million people migrating between the newly independent nations of India and Pakistan, which is the largest mass migration in human history.

### Economy and technology

Revenues from British trade with India played a significant role in funding the Industrial Revolution.
The British-built railways transformed Indian society in a number of ways, allowing for new forms of transregional and international commerce to emerge. By the turn of the 20th century, they had contributed to India becoming the ninth-largest exporter in the world. However, Indians were banned from manufacturing their own locomotive technology in 1912; this meant that the craft had to be re-learned after independence in 1947.

### Legacy

Upon India's 1947 independence, British Prime Minister Clement Attlee dubbed India the "Light of Asia", implying that it would act as a model of liberal democracy.
European ideas around race, which were used in the colonial era to explain the vast European empires and the apparent centuries-long downfall of India, factored into the martial race theory and similar social hierarchies. Islamic legacies in India also came to be perceived more negatively, as the British, who were influenced by their European Christian history of conflict with Muslims and also seeking to justify their control of India, portrayed the Indo-Muslim period in a more negative light and made themselves out to be the saviours of the Hindu community. In the aftermath of Partition, independent India's historians sought to downplay atrocities in the Indo-Muslim period to maintain communal harmony, though this has been reversed in the 21st century due to the rise of Hindu nationalism.
British India was important to the overall British Empire; its record of helping the British Empire expand played a role in the deterioration of modern China–India relations, as postcolonial Chinese strategists were wary of India attempting to maintain an outsized role in Asia (see also: Himalayan Rim#History). Negative Afghanistan–Pakistan relations also trace back to the extension of British India's borders into Pashtunistan.