‘Ali reported God's messenger as saying, “If anyone leaves a spot on a hair which has been sexually defiled without washing it, such and such an amount of hell will have to be suffered for it.” ‘Ali said, “On that account I cut my hair; on that account I cut my hair,”* saying it three times.
*Lit. "I treated my hair as an enemy."
Abu Dawud, Ahmad and Darimi transmitted it, but Ahmad and Darimi did not repeat, “On that account I cut my hair.”