Sahih Muslim Book 45, Hadith 113
" He had a private meeting with them and hurled malediction upon them and cursed them and sent them out."
Allah's Messenger, the good would reach everyone but it would not reach these two. He said: Why so? I said: Because you have invoked curse and hurled malediction upon both of them. He said: Don't you know that I have made condition with my Lord saying thus: O Allah, I am a human being and that for a Muslim upon whom I invoke curse or hurl malediction make it a source of purity and reward.
O Allah, I am a human being and for any person amongst Muslims upon whom I hurl malediction or invoke curse or give him whipping make it a source of purity and mercy.