DANIEL 9:3-4
Daniel and his friends were in a strange land, prisoners of a king who sought to benefit from their superior skills and intellect. As he grew to manhood, Daniel managed to operate within the foreign system without compromising his belief in the heavenly Father. He did not eat forbidden foods. He did not bow to idols. He valiantly maintained his prayer times, even in the face of persecution and punishment. God honored Daniel's obedience and faithfulness, rescuing him from the lion's den and blessing him with great favor. At every crossroads, Daniel chose to follow the commands of the Lord. He still had to endure trying situations, but God was ever faithful in His protection and provision.
The biblical principles in effect during the Babylonian captivity still hold true. God promises to make secure those who obey His Word. He doesn't promise that we will avoid trials and hard times, but He does say that He will accompany and help us every step of the way. Proverbs 12:13 states that the righteous will come through trouble.
If you know there is sin in your life, then fear, doubt, and frustration are certain to follow. The Lord’s comforting security is available to anyone, but the prerequisite is obedience to His Word. Don't expect God's blessing if you are living in rebellion.
Conversely, obedience will result in courage and contentment in your life regardless of your circumstances. Throughout his life, Daniel repeatedly refused to change or bend his principles, even in the face of what appeared to be sure doom. God intervened every single time—and He will also act on your behalf.