The term "levite marriage comes from a Latin word that means "husband's brother," and refers to a custom known throughout the ancient world. When a married man died without leaving any male children, his brother was expected to marry the widow. Children of that second marriage were considered children of the first husband. This custom is alluded to in the story of Onan in Genesis 38, in which Onan refused to impregnate his brother's wife lest his own children lose his inheritance. Moses codified the custom in his Law, but softened it by giving the brother the option of refusal.
By the time the book of Ruth was written, the practice had extended beyond the immediate brother to include even distant relatives. An unnamed distant kinsman was given the opportunity to marry Ruth, a childless widow of an Israelite. Only when this relative refused was Boaz free to marry her. A man was forbidden to take his brother's wife while he still lived, hence John the Baptist's rebuke of Herod for marrying Herodias, his brother Philip's wife. The Sadducees, who did not believe in the resurrection, used a hypothetical example of levitate marriage to test Jesus. They asked whose wife a woman would be in the resurrection if she had married seven brothers, consecutively, according to levitate custom (Matt. 22. 23-33).