Ibn Shimasah al-Mahri (may Allah have mercy on him) said: We were present with Sayyiduna Amr bin al-As (may Allah be pleased with him) at the time of his death. He said: I came to the Messenger of Allah (peace and blessings be upon him) to give him the pledge of allegiance upon Islam. I said: Stretch out your hand, O Messenger of Allah! I want to give you the pledge. He (peace and blessings be upon him) stretched out his hand, and I drew my hand back. He (peace and blessings be upon him) asked: "O Amr! What is the matter?" I said: I want to make a condition. He (peace and blessings be upon him) said: "What condition do you make?" I said: My condition is that I be forgiven. He (peace and blessings be upon him) said: "O Amr! Do you not know that Islam wipes out all the sins that came before it?"
Hadith Referenceالسنن الكبرى للبيهقي / كتاب السير / 18190