It is narrated from Sayyiduna Ibn Abbas (may Allah be pleased with them both) that the Prophet (peace and blessings be upon him) said: "Whoever commits sodomy with an animal, kill that person and also kill the animal, and whoever commits adultery with a mahram (a close relative whom one is forbidden to marry), kill him as well."