By the late fourth century
BC, the kingdom of Magadha
was the most powerful north Indian state and controlled much of the Ganges
basin. It was ruled by a king of the Nanda dynasty
from their capital Pataliputra. Little is known of the Nandas, who had usurped the throne
earlier in the century and who, according to a later source, were hated by their subjects.
The rise of Magadha had begun during the reign of Bimbisara, a contemporary of the Buddha, and continued under his son, Ajatashatru. The conquest of territories to the southeast, north and west brought economic benefits to the Magadha, which now controlled the routes to the seaports of the Ganges delta and those to the south. Megadha's power and efficiency were based on a centralized bureaucracy, a standing army paid out of taxation and a network of roads.
Meanwhile, northwest of the Ganges region, in modern Pakistan, there were several small kingdoms and tribal republics, as well as the Persian satrapies of Gandhara and Hindush. Alexander the Great entered India in 327 BC and temporarily occupied the Punjab and Sind. On his return to Babylon, Alexander left governors and a few garrisons in the conquered provinces, but in the years of strife that followed his death in 323 BC, the Greeks departed.
Then, sometime between 324 and 317 BC, a young adventurer named Chandragupta Maurya defeated the last king of the Nandas and gained the throne of Magadha. He then moved northwest to exploit the power vacuum created by Alexander's departure, conquered the territories up to the Indus and advanced to central India. Subsequently he returned to the northwest and in 302 BC defeated the Seleucid king Seleucus Nicator, and as a result gained eastern Afghanistan.
Chandragupta's empire now reached from Kandahar in the west to the mouth of the Ganges in the east. Despite the conflict with the Seleucids, relations between them and the Mauryans were friendly, and there was a regular exchange of envoys and gifts. Seleucus's ambassador Megasthenes lived at Pataliputra (modern Patna) for many years and left a description of the city with its timber-built houses and great palace surrounded by extensive city walls.
Toward the end of his life, Chandragupta is said to have converted to Jainism and abdicated, before ending his life in the traditional Jain way - deliberate starvation. His son Bindisura extended Mauryan control as far south as Mysore. Following his death, there was a dynastic dispute, and the throne was seized by his son Ashoka, reputedly a tyrant at the outset of his reign.
Eight years after his accession, Ashoka campaigned in Kalinga, where, in his own words, "a hundred and fifthy thousand people were deported, a hundred thousand were killed, and many times that number perished." Filled with remorse, he went through a spiritual crisis and became a convert to Buddhism. This eventually led him to forswear war.
Buddhism did not become a state religion, but because of Ashoka's support, the movement grew rapidly. The emperor sent missionaries abroad to the Hellenistic rulers, urging them to abandon aggression, and to Sri Lanka, where he also sent his son Mahinda, and possibly to Nepal. Many stupas, sacred dome-shaped structures containing relics of the Buddha or a saint, were set up, including the inner core of the Great Stupa at Sanchi. Ashoka's policies did not survive him, and on his death in about 232 BC, the great empire began to disintegrate.