Many serious Christians are concerned about the violence that permeates the Old Testament. They believe that it is inconsistent with the message of Jesus in the New Testament. Jesus suffered in the face of evil and violence. He did not fight against it. Engaging in violence seems to be inconsistent with his teaching and behaviour. This makes the violence of the Old Testament hard to explain.
I believe that the key understanding that is missing from most discussions on this topic is and understanding of spiritual warfare and the precariousness of the battle that God was fighting.
God Stymied
When Adam and Eve sinned against God, they handed authority over the earth to the spiritual forces of evil. The consequence of this authority shift was that God was shut out of the wonderful world he had created. He could not act on earth, unless a human called out and gave him authority to help.
When God gave Adam and Eve dominion over the earth, he meant what he said. He was not half-heartedly giving authority, thinking that he could take it back if things turned sour. That would have been dishonest, and God does not work like that.
God had a long-term strategy to restore his creation, but the first few thousand years were a hard struggle. He could not act on earth, unless humans asked for help. He can only act on earth, if humans give him authority, so he needed loyal people and a place to work. He needed humans to give him authority to act on earth. God had a plan to restore his influence, but it would take time.
For most of the Old Testament age, God was shut out of the world that he had created. During this long season, he only received rare opportunities to gain influence on earth. He used each of these very wisely, but could not make much progress. The spiritual powers of evil virtually had a free hand to work their evil on earth. God keeps his word, so when they lost it, he did not take back the authority over the earth that he had given to humans. He had to find other sub-optimal methods to accomplish his purposes. This sometimes made violence necessary.
In the Old Testament age, God had only a few people who walked in the Spirit, because the Holy Spirit could not be released in fullness until after the cross. However, there was a massive battle going on in the spiritual realms. Because humans had given the spiritual powers of evil authority over the earth, God had limited ability to fight against them. This was a serious struggle, and God had only limited authority to act to restrain them.
Sub-Optimal
God had to behave differently in the Old Testament age, because he was fighting against ruthless spiritual enemies with limited authority to act freely. In this constrained situation, he often had to use violence to keep the spiritual powers of evil from getting out of hand. The cross changed the nature of this battle. Once the powers of evil were defeated by Jesus, God no longer needed to use violence to deal with spiritual evil. His people could defeat the powers of evil by preaching the gospel in the power of the spirit and forces them to retreat in his name.
Until Jesus came and died on the cross and defeated the spiritual powers of evil, God was constrained in how he could deal with evil and restrain its harm. He often had to use violence to restrain evil from getting out of hand. He used his authority in the spiritual realms to release his angels to manipulate the struggles between the evil spiritual powers to accomplish his purposes. That sometimes resulted in violence. After Jesus, that violence was less necessary, because his people could defeat the spiritual powers of evil by the power of his blood and his word.
Before the flood, humans had wrecked the earth, but they were not alone. The spiritual powers of evil were working through them to wreck it because they hated God's creation. During their fall, Adam and Eve unwittingly surrendered the authority on earth that God had given them to the spiritual powers of evil. The evil powers had gone to work to lead humans astray and wreck God's good earth.
By the time of Noah, the spiritual powers of evil were so strong that the earth was in danger of being totally destroyed. The only way to prevent this from happening was to destroy life on earth. The flood limited the ability of the powers of evil to work evil on earth, and many were locked up where they could do no harm. (See Rainbow covenant.)
Prior to the cross, the only way for people following God to deal with evil spirits was to keep separate from the people and things carrying them. People who chose to follow God did not have the blood of Jesus to protect them, so they were vulnerable to attack by the evil powers. The best form of protection was to remain separate from people carrying evil spirits. This is why God told the Israelites to drive the Canaanites out of the land. They would carry the evil spirits out with them. Allowing the Canaanites to remain in the land would leave the land full of evil spirits.
During the time when the Israelites were slaves in Egypt, a host of evil spirits flooded the land of Canaan, because they knew God had promised it to Abraham, and they wanted to get there first. God did not want to start a war with the Canaanites, but he had to drive the evil spirits out of the land. The only way to do this was to drive out the Canaanites possessed and controlled by them.
God's plan was to send his angels to stir up natural events that would fill the Canaanites with fear and terror, collapsing city wall and massive hailstones from the sky, dangerous hornets (Joshua 6:20; 10:11; Deut 7:20). The people living in the land would be filled with such fear and terror, that they would flee the land, carrying their evil spirits with them.
I will send my terror ahead of you and throw into confusion every nation you encounter. I will make all your enemies turn their backs and run (Ex 23:27).
This very day I will begin to put the terror and fear of you on all the nations under heaven. They will hear reports of you and will tremble and be in anguish because of you (Deut 2:25).
You saw with your own eyes the great trials, the signs and wonders, the mighty hand and outstretched arm, with which the Lord your God brought you out. The Lord your God will do the same to all the peoples you now fear. Do not be terrified by them, for the Lord your God, who is among you, is a great and awesome God (Deut 7:19-21).
No one will be able to stand against you. The Lord your God, as he promised you, will put the terror and fear of you on the whole land, wherever you go (Deut 11:25).
Unfortunately, Joshua did not understand God's plan and started a war against the Canaanite kings. This tight contact allowed the evil spirits to stay in the land by jumping across to the victorious invading armies (see Violent War in the Old Testament).Prior to the cross, the people of Israel had to keep away from people with skin diseases. The disease was a sign that they might have been attacked by an evil spirit. Remaining separate reduced the risk that the evil spirit would attack them. Many of the instructions in Leviticus were designed to keep people separate.
In contrast, Jesus began his ministry by reaching out and embracing a person with skin disease. He told his followers to lay hands on them and pray for them. His ministry changed the method for dealing with evil spirits. (More at Clean/Unclean)
God sometimes used wars to accomplish his purposes, but does not start wars. He manipulates the outcomes of the wars that have been started by evil spiritual powers to achieve his purposes. Political-spirits and government-spirits used military empires to control the world. The only way that God could constrain them was to stir up other military power against them.
The powers of evil are not united. They often fight against each other to get better positions in the hierarchy of evil. The Prince of Persia and his followers fought against the Assyrian Spirit and his cohorts. God used his authority in the spiritual realms to release his angels to manipulate these struggles between the evil spiritual powers to accomplish his purposes.God mostly accomplished his purposes by sending his angels to fight against the political-spirits and government-spirits (principalities and powers) and not letting a different one win. He fought against the spiritual power of Babylon, which allowed the spiritual Prince of Persia to defeat it. This allowed the Persian armies to conquer and destroy Babylon.
Since the ministry of Jesus, God does not want his people on earth using war to accomplish his purposes. He wants his followers on earth to be people of peace. Preaching the gospel in the Spirit is a more effective tool for defeating evil. (More at God and War).
When the spiritual powers of evil tricked Adam and Eve into surrendering their authority on to them, they gained a huge victory against God, because they could prevent him from intervening on earth. Understanding this shift in the balance of power explains much of the violence in the Old Testament. God could only act if humans gave him permission, and that did not happen often, so the spiritual powers of evil had a free hand to work their evil.
Whenever God gained authority to act on earth, they reacted with dreadful violence on earth. The intensity of their evil attack often left God with no option but to use violence against them. This was the only tool that he had to restrain them. God would have preferred to use better methods for dealing with evil, but he could not do that until Jesus had come and defeated the spiritual powers of evil by dying on the cross. And God could not send Jesus until all the necessary preparation was complete. Otherwise, Jesus would have been destroyed as soon as he was born on earth (See God's Big Strategy).
Tense Time
The Old Testament age was a desperate time. The spiritual powers of evil had gained a great victory, and God's ability to respond was severely constrained. In this situation, God had to use violence from time to time, because that was the only way he could constrain the spiritual powers who were intent on using evil to wrecking God's world.
Jesus victory on the cross changed everything. He destroyed the authority on earth of the spiritual powers of evil. The best way to defeat them is to preach the good news of Jesus in the power of the Spirit. They can be defeated with the sword of the Spirit and the shield of faith. These are God's preferred method for dealing with evil.
God is always Sovereign
Of course, as creator, God has always remained sovereign over his creation. But as a sovereign creator, he freely chose to constrain his sovereignty by delegating authority on earth to the humans he created. A sovereign God can do that if he chooses. Giving humans authority and freedom limited his sovereignty. A God who cannot freely choose to limit his sovereignty in this way is not truly sovereign.
A sovereign God can choose not to control everything on earth. If God does control everything on earth all the time, he is responsible for evil. Actually, humans are responsible for evil, because they allowed evil into the domain that God entrusted to them.
More at God and Violence
More on this topic in my book called Kingdom Authority.