(On the day when the wrong-doer gnaweth his hands…) [25:27]. ‘Ata’ al-Khurasani reported that Ibn ‘Abbas said: “Ubayy ibn Khalaf used to go to the Prophet, Allah bless him and give him peace, keep his company and listen to his speech without believing in him. ‘Uqbah ibn Abi Mu‘ayt, then, rebuked him for doing so, and so this verse was revealed about it”. Said al-Sha‘bi: “ ‘Uqbah [ibn Abi Mu‘ayt] was a friend of Umayyah ibn Khalaf. When ‘Uqbah embraced Islam, Umayyah said to him: ‘I do not want to ever see you if you follow Muhammad’. ‘Uqbah disbelieved again and renounced Islam to please his friend, and so Allah, exalted is He, revealed this verse”. Other commentators of the Qur’an said: “Ubayy ibn Khalaf and ‘Uqbah ibn Abi Mu‘ayt were allies. It was the habit of ‘Uqbah, upon returning from a travel, to invite the nobles of his people to eat with him. ‘Uqbah also used to keep the company of the Messenger of Allah, Allah bless him and give him peace. He returned one day from one of his travels, made some food and invited people and the Messenger of Allah, Allah bless him and give him peace, to eat. When the food was placed before the invitees, the Messenger of Allah, Allah bless him and give him peace, said to him: ‘I will not eat your food until you bear witness that there is no deity except Allah and that I am the Messenger of Allah’. ‘Uqbah said: ‘I bear witness that there is no deity except Allah and that Muhammad is the Messenger of Allah’, upon which the Messenger of Allah, Allah bless him and give him peace, ate from his food. Ubayy was absent on that occasion. But when he was informed of what had happened, he said to ‘Uqbah: ‘You have renounced the religion of your forefathers?’ ‘Uqbah said: ‘By Allah, I did not. I had a man in my house who refused to eat my food unless I bore witness to him and I was ashamed to let him leave my house without him eating, and so I bore witness to him and he ate my food’. Ubayy said to him: ‘I will never be happy with you until you go to him, spit on his face and step on his neck’.
Asbab Al-Nuzul by Al-Wahidi , trans. Mokrane Guezzou