Deuteronomy 23:9

9 When you are camped out, at war with your enemies, be careful to keep yourself from anything ritually defiling.