But when Daniel learned that the law had been signed, he went home and knelt down as usual in his upstairs room, with its windows open toward Jerusalem. He prayed three times a day, just as he had always done, giving thanks to his God. Daniel 6:10 (NLT)
Ever ask yourself why Daniel prayed three times a day in front of an open window when the law said that if he did, he would be thrown into the Lion's Den? Why didn't he go to an inner room and pray there? Why ask for trouble? I am sure he knew the men who had gotten the decree signed were after him. He was super high up in the kingdom so he knew of the law and exactly what it said.
Maybe it had something to do with his history with God. Daniel had been captured and taken away to a foreign land. He had gone through lots of frightening stuff. First, he was probably made into a Eunuch. Then, he found the courage to stand up for himself and ask to eat his preferred diet to keep his strength. He was high up in the kingdom which means the competition and subterfuge were palatable. The kingdom had changed rulers which also created possibilities for death.
All through this Daniel counted on God to protect and deliver him. Day after day God kept his promises and cared for Daniel and his friends. Daniel looked to God for his strength and made him his refuge.
What would you do? If God had proved over and over again that he was there for you, would you deny your relationship with him because something bad happened to you? Would you look back and remember who God was and what he had done in your life or would you only look at your current circumstance and make decisions based on that?
Often it is easier to walk away and call it quits but if you truly know who God is, you can't. No matter what the cost, you know that this is the side you want to take a stand on. It's always better to trust the God you know than the devil you don't.