If God unconditionally loves everyone, how could He kill so many people in the Old Testament?
As Creator, God has power over the life and death of all He has created. From all eternity God has marked out every day each person will live (Ps. 139:16). As humanity’s Judge, He has the authority to call us to account for our actions. He is the “judge of all the earth” and His decisions are always right (Gen. 18:25).
In the Old Testament, the Lord did command Israel to destroy people whose idolatrous practices showed that they did not know or follow God. As a righteous Judge, God deemed them deserving of death just like every sinner is deserving of death (Rom. 3:23). “There is no one righteous, not even one” (Rom. 3:10). The punishment for sin is death, and these deaths came at the hands of Israel so that the idolatrous practices of these nations would not ensnare God’s people (Deut. 7:4, 25).
This may seem difficult for us to reconcile with our understanding that God is a God of love (1 John 4:16). But God's love is clearly evident throughout both the Old and New Testaments (Deut. 7:9; Ps. 36:7; Jer. 32:18; Zeph. 3:17; John 3:16; Rom. 5:8). God’s freedom to remove people from this world by death reveals His power as Our Righteous Judge, but it is not an indication of His lack of love which provided the only way for our salvation (John 3:16).