The earliest authenticated human remains in South Asia date to about 30,000 years ago. Nearly contemporaneous Mesolithic rock art sites have been found in many parts of the Indian subcontinent, including at the Bhimbetka rock shelters in Madhya Pradesh. Around 7000 BCE, the first known Neolithic settlements appeared on the subcontinent in Mehrgarh and other sites in western Pakistan. These gradually developed into the Indus Valley Civilisation, the first urban culture in South Asia; It flourished during 26001900BCE in Pakistan and western India. Centred on cities such as Mohenjo-daro, Harappa, Dholavira, and Kalibangan, and relying on varied forms of subsistence, the civilisation engaged robustly in crafts production and wide-ranging trade.During the period 2000500 BCE, in terms of culture, many regions of the subcontinent transitioned from the Chalcolithic to the Iron Age. The Vedas, the oldest scriptures of Hinduism, were composed during this period, and historians have analysed these to posit a Vedic culture in the Punjab region and the upper Gangetic Plain. Most historians also consider this period to have encompassed several waves of Indo-Aryan migration into the subcontinent from the north-west.   The caste system arose during this period, which created a hierarchy of priests, warriors, free peasants and traders, and lastly the indigenous peoples who were regarded as impure; and small tribal units gradually coalesced into monarchical, state-level polities.  On the Deccan Plateau, archaeological evidence from this period suggests the existence of a chiefdom stage of political organisation. In southern India, a progression to sedentary life is indicated by the large number of megalithic monuments dating from this period, as well as by nearby traces of agriculture, irrigation tanks, and craft traditions.[33
In the late Vedic period, around the 6th century BCE, the small states and chiefdoms of the Ganges Plain and the north-western regions had consolidated into 16 major oligarchies and monarchies that were known as the mahajanapadas.  The emerging urbanisation and the orthodoxies of this age also created heterodox religious movements, two of which became independent religions. Buddhism, based on the teachings of Gautama Buddha attracted followers from all social classes excepting the middle class; chronicling the life of the Buddha was central to the beginnings of recorded history in India.   Jainism came into prominence during the life of its exemplar, Mahavira. In an age of increasing urban wealth, both religions held up renunciation as an ideal, and both established long-lasting monastic traditions. Politically, by the 3rd century BCE, the kingdom of Magadha had annexed or reduced other states to emerge as the Mauryan Empire. The empire was once thought to have controlled most of the subcontinent excepting the far south, but its core regions are now thought to have been separated by large autonomous areas.  The Mauryan kings are known as much for their empire-building and determined management of public life as for Ashoka's renunciation of militarism and far-flung advocacy of the Buddhist dhamma.