Sayyiduna Imran bin Husayn (may Allah be pleased with him) said: I came to the Messenger of Allah (peace and blessings be upon him) with a group of my people to ask him for mounts, and he (peace and blessings be upon him) said: "By Allah, I will not give you mounts; by Allah, I have nothing on which to mount you," saying this twice. Then three loads of camels with fine white humps came to the Prophet (peace and blessings be upon him), so he (peace and blessings be upon him) sent for us and gave us mounts. When we set off with them, I said to my companions: I do not think we will be blessed in them, for the Messenger of Allah (peace and blessings be upon him) swore that he would not give us mounts, and yet he gave us mounts. So we returned to him (peace and blessings be upon him) and told him (peace and blessings be upon him) about his oath. He (peace and blessings be upon him) said: "I did not forget my oath, but when I swear an oath about something and then see something better than it, I do what is better and expiate my oath."
Hadith Referenceالمعجم الكبير للطبراني / باب العين / 15437