Sahih Bukhari Volume 008, Book 079, Hadith Number 709.

Narated By Abu Musa Al-Ash’ari: I went to Allah's Apostle along with a group of people from (the tribe of) Al-Ash'ari, asking for mounts. The Prophet said, "By Allah, I will not give you anything to ride, and I have nothing to mount you on." We stayed there as long as Allah wished, and after that, some camels were brought to the Prophet and he ordered that we be given three camels. When we set out, some of us said to others, "Allah will not bless us, as we all went to Allah's Apostle asking him for mounts, and although he had sworn that he would not give us mounts, he did give us." So we returned to the Prophet; and mentioned that to him. He said, "I have not provided you with mounts, but Allah has. By Allah, Allah willing, if I ever take an oath, and then see that another is better than the first, I make expiration for my (dissolved) oath, and do what is better and make expiration."

 

Related Hadith(s)