Isaac's success with his wells but served to increase the envy of the Philistines, for he had come upon water in a most unlikely spot and, besides, in a year of drouth. But "the Lord fulfils the desire of them that fear Him." As Isaac executed the will of his Creator, so God accomplished his desire. And Abimelech, the king of Gerar, speedily came to see that God was on the side of Isaac, for, to chastise him for having instigated Isaac's removal from Gerar, his house was ravaged by robbers in the night, and he himself was stricken with leprosy. The wells of the Philistines ran dry as soon as Isaac left Gerar, and also the trees failed to yield their fruit. None could be in doubt but that these things were the castigation for their unkindness.
Abimelech and the Patriarchs
Legends of the Jews 6:40