Sayyiduna Abbas bin Mirdas (may Allah be pleased with him) said that the Prophet (peace and blessings be upon him) supplicated on the night of Arafah for forgiveness and mercy for his Ummah, and supplicated abundantly. Allah Almighty revealed to him (peace and blessings be upon him): "I have done this: the sins that are between Me and them I have forgiven, but their wrongdoing is not forgiven." He (peace and blessings be upon him) said: "O Allah! You are able to give this wronged person a reward better than (what he suffered from) the wrong done to him, and to forgive this wrongdoer." But this supplication was not answered that night. When it was the morning of Muzdalifah, he (peace and blessings be upon him) repeated this supplication, and Allah Almighty, accepting it, said: "I have forgiven them." Then the Prophet (peace and blessings be upon him) smiled, and his Companions (may Allah be pleased with them) asked: "You (peace and blessings be upon him) have smiled at a time when you did not smile before?" He (peace and blessings be upon him) said: "I am smiling at the enemy of Allah, Iblis: when he learned that my supplication concerning my Ummah had been accepted, he began to cry out for ruin and destruction and to throw dust upon his head."
Hadith Referenceالسنن الكبرى للبيهقي / كتاب الحج / 9481