Seleucid–Mauryan war
The Seleucid–Mauryan War was fought between 305 and 303 BC. It started when Seleucus I Nicator of the Seleucid Empire sought to retake the Indian satrapies of the Macedonian Empire, which had been occupied by Emperor Chandragupta Maurya, of the Maurya Empire. The war ended in a settlement resulting in the annexation of the Indus Valley region and part of Afghanistan to the Mauryan Empire, with Chandragupta securing control over the areas that he had sought, and a marriage alliance between the two powers. After the war, the Mauryan Empire emerged as the dominant power of the Indian subcontinent, and the Seleucid Empire turned its attention toward defeating its rivals in the west. Background 

Chandragupta Maurya established himself as ruler of Magadha around 321 BC. He decided to conquer the Nanda Dynasty, rulers at the time of the Gangetic Plain. He fought the empire for eleven years with successful guerrilla campaigns, and captured the Nanda capital of Pataliputra. This led to the fall of the empire and the eventual creation of the Maurya Empire under Em Chandragupta Maurya. The Persian provinces in what is now modern Afghanistan, together with the wealthy kingdom of Gandhara and the states of the Indus Valley, had all submitted to Alexander the Great and become part of his empire. When Alexander died, the Wars of the Diadochi ("Successors") split his empire apart; as his generals fought for control of Alexander's empire. In the eastern territories one of these generals, Seleucus I Nicator, was taking control and was starting to establish what became known as the Seleucid Empire. According to the Roman historian Appian, Seleucus,

Alexander had appointed satraps in control of his territories, including those of the Indus Valley. The Mauryans annexed the areas governed by  Nicanor,  Phillip,  Eudemus and Peithon. This established Mauryan control all the way to the banks of the Indus. Chandragupta's victories convinced Seleucus that he needed to secure his eastern flank. Seeking to hold the Macedonian territories there, Seleucus thus came into conflict with the emerging and expanding Mauryan Empire over the Indus Valley. War 
Details of the conflict are lacking. According to Appian,

It is unknown if there was in fact a pitched battle. Military historian John D. Grainger has argued that Seleucus, upon crossing the Indus, "would find himself in a trap, with a large river at his back and a hostile continent before him," and consequently could not have advanced much farther than the Indus. According to Grainger, the details of the conflict are unclear, but the outcome clearly must have been "a decisive Indian victory," with Chandragupta driving back Seleucus' forces as far as the Hindu Kush and consequently gaining large territories in modern-day Afghanistan. Wheatley and Heckel suggest that the degree of friendly Maurya-Seleucid relations established after the war implies that the hostilities were probably "neither prolonged nor grievous". Consequences 
Seleucus Nicator ceded the Hindu Kush, Punjab and parts of Afghanistan to Chandragupta Maurya. In consequence of their arrangement, Seleucus received 500 war elephants from Chandragupta Maurya, which subsequently influenced the Wars of the Diadochi in the west. Seleucus and Chandragupta also agreed to a marriage alliance, probably the marriage of Seleucus' daughter (named Berenice in Indian Pali sources) to Chandragupta. According to Strabo, the ceded territories bordered the Indus:

The geographical position of the tribes is as follows: along the Indus are the Paropamisadae, above whom lies the Paropamisus mountain: then, towards the south, the Arachoti: then next, towards the south, the Gedroseni, with the other tribes that occupy the seaboard; and the Indus lies, latitudinally, alongside all these places; and of these places, in part, some that lie along the Indus are held by Indians, although they formerly belonged to the Persians. Alexander [III 'the Great' of Macedon] took these away from the Arians and established settlements of his own, but Seleucus Nicator gave them to Sandrocottus [Chandragupta], upon terms of intermarriage and of receiving in exchange five hundred elephants. — Strabo 15.2.9

From this, it seems that Seleucus surrendered the easternmost provinces of Arachosia, Gedrosia, Paropamisadae and perhaps also Aria. On the other hand, he was accepted  by other satraps of the eastern provinces. His Iranian wife, Apama, may have helped him implement his rule in Bactria and Sogdiana. This would tend to be corroborated archaeologically, as concrete indications of Mauryan influence, such as the inscriptions of the Edicts of Ashoka which are known to be located in, for example, Kandhahar in today's southern Afghanistan. Some authors claim that the argument relating to Seleucus handing over more of what is now southern Afghanistan is an exaggeration originating in a statement by Pliny the Elder referring not specifically to the lands received by Chandragupta, but rather to the various opinions of geographers regarding the definition of the word "India":

Most geographers, in fact, do not look upon India as bounded by the river Indus, but add to it the four satrapies of the Gedrose, the Arachotë, the Aria, and the Paropamisadë, the River Cophes thus forming the extreme boundary of India. According to other writers, however, all these territories, are reckoned as belonging to the country of the Aria. — Pliny, Natural History VI, 23

The arrangement proved to be mutually beneficial. The border between the Seleucid and Mauryan Empires remained stable in subsequent generations, and friendly diplomatic relations are reflected by the ambassador Megasthenes, and by the envoys sent westward by Chandragupta's grandson Ashoka. Chandragupta's gift of war elephants "may have alleviated the burden of fodder and the return march" and allowed him to appropriately reduce the size and cost of his large army, since the major threats to his power had now all been removed. With the war elephants acquired from the Mauryas, Seleucus was able to defeat his rival, Antigonus, along with his allies at the Battle of Ipsus. Adding Antigonus's territories to his own, Seleucus would found the Seleucid Empire, which would endure as a great power in the Mediterranean and the Middle East until 64 BC. Mauryan control of territory in what is now Afghanistan helped guard against invasion of India from the northwest. Chandragupta Maurya went on to expand his rule in India southward into the Deccan. See also
 First Battle of Jhelum

Notes

References

Sources
 
 
 
 
 

Wars involving India
Wars involving the Maurya Empire
Mauryan
300s BC conflicts
Maurya Empire
Foreign relations of ancient India
Invasions by India
Seleucus I Nicator