Sahih Muslim , Hadith 1764

It has been narrated on the authority of Abu Huraira who said: The Messenger of Allah sent some horsemen to Najd. They captured a man. He was from the tribe of Banu Hanifa and was called Thumama b. Uthal. He was the chief of the people of Yamama. People bound him with one of the pillars of the mosque. The Messenger of Allah came out to (see) him. He said: O Thumama, what do you think? He replied: Muhammad, I have good opinion of you. If you kill me, you will kill a person who has spilt blood. If you do me a favour, you will do a favour to a grateful person. If you want wealth, ask and you will get what you will demand. The Messenger of Allah (may peace be pon him) lefthim (in this condition) for two days, (and came to him again) and said: What do you think, O Thumama? He replied: What I have already told you. If you do a favour, you will do a favour to a grateful person. If you kill me, you will kill a person who has spilt blood. If you want wealth, ask and you will get what you will demand. The Messenger of Allah left him until the next day when he (came to him again) and said: What do you think, O Thumama? He replied: What I have already told you. If you do me a favour, you will do a favour to a grateful person. If you kill me, you will kill a person who has spilt blood. If you want wealth ask and you will get what you will demand. The Messenger of Allah said: Set Thumama free. He went to a palm-grove near the mosque and took a bath. Then he entered the mosque and said: I bear testimony (to the truth) that there is no god but Allah and I testify that Muhammad is His bondman and His messenger. O Muhammad, by Allah, there was no face on the earth more hateful to me than your face, but (now) your face has become to me the dearest of all faces. By Allah, there was no religion more hateful to me than your religion, but (now) your religion has become the dearest of all religions to me. By Allah, there was no city more hateful to me than your city, but (now) your city has become the dearest of all cities to me. Your horsemen captured me when I intended going for Umra. Now what is your opinion (in the matter)? The Messenger of Allah announced good tidings to him and told him to go on 'Umra. When he reached Mecca, somebody said to him: Have you changed your religion? He said: No! I have rather embraced Islam with the Messenger of Allah. By Allah, you will not get a single grain of wheat from Yamama until it is permitted by the Messenger of Allah.

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

sunnah.com

The same tradition has been narrated by a different chain of transmitters with a slight difference in the wording.

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

sunnah.com