Tamar had been the wife of Judah's elder sons Er and Onan (via Levirate marriage; cf. Deuteronomy 25:5-10). After Onon died, Judah refused to let Tamar marry his yougest son, Shelah. Tamar then disguised herself as a prostitute, bearing Perez and Zerah. (Genesis 38, 46:12). Although biologically Judah's sons, they were legally Er's sons; however, Leviticus 18:15 forbids sexual relationships between a man and his daughter-in-law.