The fifth Labour of Heracles was to clean the Augean Stables. This assignment was intended to be both humiliating (rather than impressive, as had the previous labours) and impossible, since the livestock were divinely healthy (immortal) and therefore produced an enormous quantity of dung. These stables had not been cleaned in over 30 years, and over 1,000 cattle lived there. However, Heracles succeeded by rerouting the rivers Alpheus and Peneus to wash out the filth.
Augeas was irate because he had promised Heracles one tenth of his cattle if the job was finished in one day. He refused to honour the agreement, and Heracles killed him after completing the tasks. Heracles gave his kingdom to Augeas' son Phyleus, who had been exiled for supporting Heracles against his father.