The Greek generals Eudemus and Peithon ruled in the Indus Valley until around 317 BCE, when Chandragupta Maurya (with the help of Chanakya, who was now his advisor) orchestrated a rebellion to drive out the Greek governors, and subsequently brought the Indus Valley under the control of his new seat of power in Magadha.