Sahih Bukhari Volume 003, Book 040, Hadith Number 559.
Narated By Abu Huraira : Allah's Apostle said, "Keeping horses may be a source of reward to some (man), a shelter to another (i.e. means of earning one's living), or a burden to a third. He to whom the horse will be a source of reward is the one who keeps it in Allah's cause (prepares it for holy battles) and ties it by a long rope in a pasture (or a garden). He will get a reward equal to what its long rope allows it to eat in the pasture or the garden, and if that horse breaks its rope and crosses one or two hills, then all its footsteps and its dung will be counted as good deeds for its owner; and if it passes by a river and drinks from it, then that will also be regarded as a good deed for its owner even if he has had no intention of watering it then. Horses are a shelter from poverty to the second person who keeps horses for earning his living so as not to ask others, and at the same time he gives Allah's right (i.e. Zakat) (from the wealth he earns through using them in trading etc.) and does not overburden them. He who keeps horses just out of pride and for showing off and as a means of harming the Muslims, his horses will be a source of sins to him." When Allah's Apostle was asked about donkeys, he replied, "Nothing particular was revealed to me regarding them except the general unique verse which is applicable to everything: "Whoever does goodness equal to the weight of an atom (or small ant) shall see it (its reward) on the Day of Resurrection."