Nectanebo II was ultimately defeated and, in the summer of 342 BC, Artaxerxes entered Memphis[26] and installed a satrap.[27] Nectanebo fled to Upper Egypt and finally to Nubia, where he was granted asylum. He, however, preserved a degree of power there for some time. With the help of Khabash, Nectanebo made a vain attempt to regain the throne.[28]