The Role of Torah in War

A midrash describes how God offered the Torah do the descendants of Esau, but they refused it when they heard one of its key teachings was "do not kill." What does it mean to receive and hold fast to the Torah in a time of war, where killing is a terrifying and necessary reality?