Herakles went to Elis. He did not tell Augeias that Eurystheus had ordered him to clean the stables.Instead, he made a bargain with Augeias. He promised to clean the stables if Augeias would give him some of his cattle. The bargain was made. Augeias' son Phyleos acted as witness. Herakles set to work. First, he made two holes in the stone foundation of the stables. Then he changed the paths of the Alpheios and Peneios Rivers. The rivers were made to flow through one hole and out the other. This is how the stables were washed clean. 