This is a question that I have been asked a couple of times in my life. As we were reading Deuteronomy 7 today, a few other people mentioned that they had either been asked the question by others or pondered how to answer such a question as they read this passage. In this chapter God tells Israel to kill seven different people groups when they enter the Promised Land. They are to utterly devote them to destruction. God addresses this total annihilation warfare again in Deuteronomy 20 and then in the book of Joshua where they actually carry out his instructions.
So how can we reconcile this seemingly act of genocide or ethnic cleansing with the character of God?
Justin Taylor answers this question well in this article. And Answers in Genesis offers another helpful response to this question. I’d encourage you to take the time to read these because if you haven’t been asked already, you may one day be queried. It’s best to be prepared beforehand.