Genesis 38:7

7 Er's conduct was evil, and it displeased the Lord, so the Lord killed him.