Ibn ‘Abbas reported God’s messenger as saying, ‘The one who receives the severest punishment on the day of resurrection will be he who kills a prophet, or who is killed by a prophet, or kills one of his parents, those who make representations of things, and a learned man who derives no benefit from his learning."
Baihaqi transmitted it in Shu’ab al-iman.