Chandragupta Maurya (c.321 BC - c.298 BC) was an Indian emperor, founder of the Maurya dynasty and grandfather of Asoka the Great. He conquered the Magadha kingdom (in modern Bihar and Jharkhand) and eventually controlled all India north of the Vindhya Hills. In c.305 BC, Chandragupta, with a huge army, defeated Seleucus I (Nicator) who had invaded NW India in an attempt to regain Alexander the Great's Indian provinces. Seleucus had to yield parts of Afghanistan to Chandragupta. Chandragupta also married Seleucus' daughter Helen as a part of the truce. From Megasthenes, a Seleucid envoy at the court of Chandragupta, comes considerable information about the period. The emperor dwelt in an enormous, ornate palace at Pataliputra (Patna) and administered a highly complex and bureaucratic government. He was advised by Kautilya (also called Chanakya), a very able but unscrupulous Brahman, to whom is attributed the Arthasastra, a guide to statecraft. Chandragupta established a vast secret service system. Jain tradition says that he abdicated his throne, became a Jain monk, and fasted to death.