The new border was drawn by a British lawyer, Cyril Radcliffe (lawyer who drew the border), who had never been to India before and had about five weeks for the task. It cut the Punjab and Bengal in two. Between 10 and 20 million people fled across it, Hindus and Sikhs to India and Muslims to Pakistan, and in the killings that followed between 200,000 and 2 million died; no exact count exists.

Vallabhbhai Patel (home minister who united the states), the home minister, persuaded or pressed more than 560 princely states to join India. Hyderabad was taken by the army in 1948. The Hindu maharaja of Kashmir, a mostly Muslim state, joined India in October 1947 when raiders from Pakistan invaded, and the first war over Kashmir ended in 1949 with the state divided.
The constitution, drafted by a committee chaired by B. R. Ambedkar (architect of the constitution), came into force on 26 January 1950, making India a republic. It gave every adult the vote, abolished untouchability and reserved seats for the lowest castes. In the first general election, in 1951–52, about 170 million people could vote, most of them unable to read, so parties used symbols on the ballot.

Jawaharlal Nehru (first prime minister), prime minister until his death in 1964, built dams, steel plants and institutes of technology through five-year plans, and kept India out of both Cold War camps. States were redrawn by language from 1956. India lost a short border war with China in 1962. His successor, Lal Bahadur Shastri (second prime minister), led India in a war with Pakistan in 1965 and died at Tashkent in 1966, just after signing a peace agreement.