Deuteronomy 25:5

If brethren dwell together, and one of them die, and have no child, the wife of the dead shall not marry without unto a stranger: her husband’s brother shall go in unto her, and take her to him to wife, and perform the duty of an husband’s brother unto her.

The law required that when brothers were living together and one died childless, his surviving brother was to marry the widow and raise up children to carry on the dead brother's name. The Sadducees later appealed to this requirement in the case of seven brothers successively marrying the same childless widow, asking whose wife she would be in the resurrection. Their question was not sincere inquiry but an attempt to ridicule the doctrine of the resurrection. It rested on the false assumption that marriage as instituted on earth continues in the resurrected state, when in fact it does not.