Exodus 21:34

the owner of the pit shall make it good; he shall give money to their owner, but the dead animal shall be his.

Surrounding context

21:33 "And if a man opens a pit, or if a man digs a pit and does not cover it, and an ox or a donkey falls in it,

21:34 the owner of the pit shall make it good; he shall give money to their owner, but the dead animal shall be his.

21:35 "If one man's ox hurts another's, so that it dies, then they shall sell the live ox and divide the money from it; and the dead ox they shall also divide.

Translation and sources