Exodus 22:2-3

NIV
New International Version

2“If a thief is caught breaking in at night and is struck a fatal blow, the defender is not guilty of bloodshed; 3but if it happens after sunrise, the defender is guilty of bloodshed.