They said, “Teacher, Moses wrote that if a man’s brother dies, leaving a wife but no children, then that man must marry the widow and have children for his brother.
Then Judah said to Er’s brother Onan, “Go and have sexual relations with your dead brother’s wife. It is your duty to provide children for your brother in this way.”
Then Boaz explained, “When you buy the land from Naomi, you must also marry Ruth, the Moabite, the dead man’s wife. That way, the land will stay in the dead man’s name.”