Exodus 22:2-3

MSB(i) 2 If a thief is caught breaking in and is beaten to death, no one shall be guilty of bloodshed. 3 But if it happens after sunrise, there is guilt for his bloodshed. A thief must make full restitution; if he has nothing, he himself shall be sold for his theft.