India is the second-most populous country with over 1.18 billion people in the world. In term of land area, it is the seventh-largest country. The first known permanent settlements appeared about 8,500 years ago and gradually developed into the Indus Valley Civilisation, dating back to 3400 BCE in western India. It was followed by the Vedic period, which laid the foundations of Hinduism and other cultural aspects of early Indian society. From around 550 BCE, many independent kingdoms and republics known as the Mahajanapadas were established across the country.
In 12th centuries, much of North India came under the rule of the Delhi Sultanate and later the Mughal Empire. Under the rule of Akbar the Great, India enjoyed much cultural and economic progress as well as religious harmony. The first major threat to Mughal imperial power came from a Hindu Rajput king Maha Rana Pratap of Mewar in the 16th century and later from a Hindu state known as the Maratha confederacy, that ruled much of India in the mid-18th century.
By 1856, most of India was under the control of the British East India Company. A year later, a nationwide insurrection of rebelling military units and kingdoms, known as India's First War of Independence or the Sepoy Mutiny, seriously challenged the Company's control but eventually failed.
On 15 August 1947, India gained independence from British rule, but at the same time the Muslim-majority areas were partitioned to form a separate state of Pakistan.