Sahih al-Bukhari, Hadith 6623

Narrated Abu Musa: I went to the Prophet along with a group of Al-Ash`ariyin in order to request him to provide us with mounts. He said, "By Allah, I will not provide you with mounts and I haven't got anything to mount you on." Then we stayed there as long as Allah wished us to stay, and then three very nice looking she-camels were brought to him and he made us ride them. When we left, we, or some of us, said, "By Allah, we will not be blessed, as we came to the Prophet asking him for mounts, and he swore that he would not give us any mounts but then he did give us. So let us go back to the Prophet and remind him (of his oath)." When we returned to him (and reminded him of the fact), he said, "I did not give you mounts, but it is Allah Who gave you. By Allah, Allah willing, if I ever take an oath to do something and then I find something else than the first, I will make expiation for my oath and do the thing which is better (or do something which is better and give the expiation for my oath).

حَدَّثَنَا أَبُو النُّعْمَانِ، حَدَّثَنَا حَمَّادُ بْنُ زَيْدٍ، عَنْ غَيْلاَنَ بْنِ جَرِيرٍ، عَنْ أَبِي بُرْدَةَ، عَنْ أَبِيهِ، قَالَ أَتَيْتُ النَّبِيَّ صلى الله عليه وسلم فِي رَهْطٍ مِنَ الأَشْعَرِيِّينَ أَسْتَحْمِلُهُ فَقَالَ ‏"‏ وَاللَّهِ لاَ أَحْمِلُكُمْ، وَمَا عِنْدِي مَا أَحْمِلُكُمْ عَلَيْهِ ‏"‏‏.‏ قَالَ ثُمَّ لَبِثْنَا مَا شَاءَ اللَّهُ أَنْ نَلْبَثَ، ثُمَّ أُتِيَ بِثَلاَثِ ذَوْدٍ غُرِّ الذُّرَى فَحَمَلَنَا عَلَيْهَا فَلَمَّا انْطَلَقْنَا قُلْنَا أَوْ قَالَ بَعْضُنَا وَاللَّهِ لاَ يُبَارَكُ لَنَا، أَتَيْنَا النَّبِيَّ صلى الله عليه وسلم نَسْتَحْمِلُهُ، فَحَلَفَ أَنْ لاَ يَحْمِلَنَا ثُمَّ حَمَلَنَا، فَارْجِعُوا بِنَا إِلَى النَّبِيِّ صلى الله عليه وسلم فَنُذَكِّرُهُ، فَأَتَيْنَاهُ فَقَالَ ‏"‏ مَا أَنَا حَمَلْتُكُمْ، بَلِ اللَّهُ حَمَلَكُمْ، وَإِنِّي وَاللَّهِ إِنْ شَاءَ اللَّهُ لاَ أَحْلِفُ عَلَى يَمِينٍ فَأَرَى غَيْرَهَا خَيْرًا مِنْهَا، إِلاَّ كَفَّرْتُ عَنْ يَمِينِي، وَأَتَيْتُ الَّذِي هُوَ خَيْرٌ ‏"‏‏.‏ أَوْ ‏"‏ أَتَيْتُ الَّذِي هُوَ خَيْرٌ وَكَفَّرْتُ عَنْ يَمِينِي ‏"‏‏.‏

sunnah.com