God sent punishments to the people of Israel when they sinned against Him. They suffered harsh consequences from God for provoking Him. But even so, we can say that the Lord’s mercy reached them.
The people, on this occasion, needed God’s help to win the battle, and so it was: God won the battle and did not abandon them, but provided for His people. On their journey towards Canaan, God never left them. His presence accompanied them on all their paths.
Chapter 68, verse 10 of the book of Psalms, shows us the great mercy that God has with His children and how He saves those who walk uprightly before Him: