then the Lord knows how to rescue the godly from trials, and to keep the unrighteous under punishment until the day of judgment,” (2 Peter 2:9, ESV)

The Lord knows what he is doing. He knows how to rescue the godly in/from/through trials and he knows how to punish those who oppose him.

What I find interesting here is the little, but crucial word: trial. The Complete Word Study Bible (CWSB) says that when the word translated “trial” is used [πειρασμός for Greek studs]: “When God is the agent, peirasmós is for the purpose of proving someone, never for the purpose of causing him to fall. If it is the devil who tempts, then it is for the purpose of causing one to fall.” In our verse God is the agent so we know that he can and will rescue us through trials and temptations (the word can mean both things), we know that our trial is a test and that God will sustain us through that test, be it however severe.

CWSB goes on to further explain trial as: “A state of trial in which God brings His people through adversity and affliction in order to encourage and prove their faith and confidence in Him.” We can conclude here that trials, though difficult, result in our good as we are forced to have more and more confidence in God and less and less confidence in ourselves.

Which reminds me of the second verse of the classic hymn What a Friend we Have in Jesus:

Have we trials and temptations?
Is there trouble anywhere?
We should never be discouraged,
Take it to the Lord in prayer.
Can we find a friend so faithful
Who will all our sorrows share?
Jesus knows our every weakness,
Take it to the Lord in prayer.