عَنْ أَنَسٍ أَنَّ قُرَيْشًا صَالَحُوا النَّبِيَّ صَلَّى اللَّهُ عَلَيْهِ وَآلِهِ وَسَلَّمَ فِيهِمْ سُهَيْلُ بْنُ عَمْرٍو فَقَالَ النَّبِيُّ صَلَّى اللَّهُ عَلَيْهِ وَآلِهِ وَسَلَّمَ لِعَلِيٍّ اكْتُبْ بِسْمِ اللَّهِ الرَّحْمَنِ الرَّحِيمِ فَقَالَ سُهَيْلٌ أَمَّا بِسْمِ اللَّهِ الرَّحْمَنِ الرَّحِيمِ فَلَا نَدْرِي مَا بِسْمِ اللَّهِ الرَّحْمَنِ الرَّحِيمِ وَلَكِنْ اكْتُبْ مَا نَعْرِفُ بِاسْمِكَ اللَّهُمَّ فَقَالَ اكْتُبْ مِنْ مُحَمَّدٍ رَسُولِ اللَّهِ قَالَ لَوْ عَلِمْنَا أَنَّكَ رَسُولُ اللَّهِ لَاتَّبَعْنَاكَ وَلَكِنْ اكْتُبْ اسْمَكَ وَاسْمَ أَبِيكَ قَالَ فَقَالَ النَّبِيُّ صَلَّى اللَّهُ عَلَيْهِ وَآلِهِ وَسَلَّمَ اكْتُبْ مِنْ مُحَمَّدِ بْنِ عَبْدِ اللَّهِ وَاشْتَرَطُوا عَلَى النَّبِيِّ صَلَّى اللَّهُ عَلَيْهِ وَآلِهِ وَسَلَّمَ أَنَّ مَنْ جَاءَ مِنْكُمْ لَمْ نَرُدَّهُ عَلَيْكُمْ وَمَنْ جَاءَ مِنَّا رَدَدْتُمُوهُ عَلَيْنَا فَقَالَ يَا رَسُولَ اللَّهِ أَتَكْتُبُ هَذَا قَالَ نَعَمْ إِنَّهُ مَنْ ذَهَبَ مِنَّا إِلَيْهِمْ فَأَبْعَدَهُ اللَّهُ
It is narrated from Sayyiduna Anas (may Allah be pleased with him) that the Quraysh made a treaty with the Noble Prophet (peace and blessings be upon him), and Suhail bin Amr was also in their delegation. The Noble Prophet (peace and blessings be upon him) said to Sayyiduna Ali (may Allah be pleased with him): Write “In the name of Allah, the Most Gracious, the Most Merciful.” Suhail said: We do not know what “In the name of Allah, the Most Gracious, the Most Merciful” is. Write only the phrase that we know, write “In Your name, O Allah.” The Prophet (peace and blessings be upon him) said: Write, “This treaty is from Muhammad, the Messenger of Allah.” At this point, it is as mentioned, whereas in general narrations it is stated that if anyone from the people of Makkah becomes Muslim, he will not be able to go with you.
Upon this, Suhail said: If we believed that you are the Messenger of Allah, we would have followed you. Do this: write your name and your father's name. The Noble Prophet (peace and blessings be upon him) said: Write, “This treaty is from Muhammad, son of Abdullah.” They made this condition with the Noble Prophet (peace and blessings be upon him) that if any of your people (comes to us), we will not return him, but if any of our men comes to you, you will return him to us. Upon hearing this, Sayyiduna Ali (may Allah be pleased with him) submitted: O Messenger of Allah! Should we write this condition as well? The Prophet (peace and blessings be upon him) said: Yes! Whoever leaves us and goes to them, may Allah keep him away from us.