God's ability to deliver out of trouble is nothing short of amazing. If we only knew all the times that God has delivered us from situations and problems - we would fall and worship at His feet. As it is we will have to wait for that day when we see Him and know as fully as we are known. But thankfully the Lord has put some of His glorious history in the Bible from which we can glean the wonders of His power to arrange providence according to His will.
We read here that the righteous is delivered from trouble, but that the wicked takes his place. The first thing we need to state here is that God does not promise to deliver the righteous from ALL trouble. There are times when God's purpose is served by the death of His martyrs. But for every martyr it seems that there are also those times when God does glorious deliverances among His people. There are two that are amazing because they mirror exactly what is said here in this passage - that the wicked take the place of the one who was delivered.
We read of Mordecai who would not give worship to the wicked Haman. Haman decided to do more than just kill Mordecai. He got authorization from the king to kill the entire people of Mordecai - going after the entire Jewish nation. As the Jews prayed earnestly for deliverance, God was engineering a wonderful array of providence to provide deliverance for them. Esther was queen so she had access to the king - and was willing to go even though she was not requested - thus risking her own life. As Haman proceeded to build a gallows like none other upon which to hang Mordecai - God was having the king experience a sleepless night in which he had court records read to him. He learned of Mordecai speaking of a plot to kill him - and desired to honor him. That event led to a glorious change of circumstances - in which Mordecai was delivered from the gallows - yet Haman was hung on them instead. Instead of Mordecai's family being killed - the family of Haman was hung along with him upon the gallows he built for Mordecai. Ah, the glories of my God and King - Who can work miracles of providence to accomplish His own will in history.
The second piece of Bible history involves Daniel and a lion's den. A group of wicked advisors to the king were jealous of Daniel - and thus sought a reason to accuse him before the king. Darius the King was a vain man so he fell for the trap laid for Daniel. The advisors had him sign a law that no man could pray to anyone except him for a day - with the penalty being death by lion's den if they disobeyed. Once signed - these wicked advisors awaited Daniel's godly choice to pray to God three times a day. When he bowed to pray to Jehovah, they were ready to pounce. They dragged him before the king and had him pass sentence even though he was loathe to do so. Thus Daniel found himself being lowered into a den of ravenous lions - a trouble that seemed destined to have him consumed as soon as he reached the floor of the den in which the lions awaited his arrival with salivating mouths. But God shut those mouths and delivered Daniel until morning. As he was raised out of the den - the lions did not have to worry about going hungry. The king, furious with their deceitfulness, had the wicked advisors thrown into the pit with the lions who more than obliged his offer of a second meal - crushing them as soon as they hit the ground.
God is able to deliver to the uttermost. We need to know that and trust Him to deliver us when we face trouble because we confess His name. We also need to know that He is also able to bring the wicked to a most horrific end as well - even having them take our place as He delivers us. Trust Him at all times, dear saints of God. He is good and will do what is good in our lives. Whether He offers an earthly deliverance or not - remember this one thing. The most glorious deliverance that He offers is that which is bought and paid for with the blood of His own Son at Calvary's cross. There He delivered us from His own wrath and judgment - not at the cost of the wicked - but at the cost of His own beloved Son. May that ultimate deliverance from trouble drop us to our knees daily in worship, adoration, and praise!