Exodus 21:33-36
21:33 “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 into it,
21:34 the owner of the pit must repay the loss. He must give money to its owner, and the dead animal will become his.
21:35 If the ox of one man injures the ox of his neighbor so that it dies, then they will sell the live ox and divide its proceeds, and they will also divide the dead ox.
21:36 Or if it is known that the ox had the habit of goring, and its owner did not take the necessary precautions, he must surely pay ox for ox, and the dead animal will become his.