Genesis 38:7

7 But the LORD considered Judah's oldest son Er immoral, and the LORD put him to death.