The right to protect oneself and one’s property goes at least as far back as the Code of Hammurabi. Every ancient civilization from Babylon to Tenochtitlan had some variation of this idea. It is practically the definition of civilization itself.
“If any one is committing a robbery and is caught, then he shall be put to death.”
https://en.m.wikisource.org/wiki/Codex_Hammurabi_(King_trans...
Likewise in pre-Columbian Mexico, as per the Florentine Codex:
“It was a crime to light a fire in the woods without permission, to cut down trees, to move boundary-markers, to take game from another man’s hunting trap and to steal crops from the fields. All these were crimes that could be punished by death.”
https://www.mexicolore.co.uk/aztecs/ask-experts/which-were-t...