Context: Dramatically saved from Egyptian persecution by Moses, the Israelites wander through the Wilderness of Shur, alternately praising God for their salvation and berating Him for their sufferings in the wilderness. God promises Moses that if the Israelites will keep His covenant He will make them His chosen people. After two days of sanctification the Hebrews approach Mt. Sinai, where in the midst of thunder and lightning Moses receives the Ten Commandments and other specific laws governing worship and society:
If men strive, and hurt a woman with child, so that her fruit depart from her, and yet no mischief follow: he shall be surely punished, according as the woman's husband will lay upon him; and he shall pay as the judges determine.
And if any mischief follow, then thou shalt give life for life,
Eye for eye, tooth for tooth, hand for hand, foot for foot,
Burning for burning, wound for wound, stripe for stripe.