Deuteronomy 25:5

When brothers dwell together and one of them dies without a son, the widow must not marry outside the family. Her husband’s brother is to take her as his wife and fulfill the duty of a brother-in-law for her.

Note Cited in Matthew 22:24, Mark 12:19, and Luke 20:28

BSB · Berean Standard Bible
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.

Note her husband’s…: or, her next kinsman

KJV · King James Version
If brothers dwell together, and one of them dies and has no son, the wife of the dead shall not be married outside to a stranger. Her husband’s brother shall go in to her, and take her as his wife, and perform the duty of a husband’s brother to her.
WEB · World English Bible
If brethren dwell together, and one of them die, and have no son, the wife of the dead shall not be married 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 a husband’s brother unto her.
ASV · American Standard Version

Related passages

From the Treasury of Scripture Knowledge, grouped by the word they explain.

brethren
Matthew 22:24; Mark 12:19; Luke 20:28
husband's brother
or, next kinsman.
Genesis 38:8, 9; Ruth 1:12, 13; Ruth 3:9; Ruth 4:5