I participated in my high school choir for three years. We sang all sorts of songs and medleys for concerts and competitions. It was lots of fun, sometimes hard work, but it was a good mental and physical break for me in comparison to my heavy academic load. One of the songs we sang was called "Didn't My Lord Deliver Daniel?" The students had no input on what songs we performed. "Didn't My Lord Deliver Daniel?" is an African-American spiritual from the days of slavery. It alludes to the prophet Daniel, and others from the Bible.
Daniel was carried off to Babylon as a young boy because he was one of Hebrew children who showed promise to be useful to the king. Along with only a few more Hebrews, he stayed faithful to his God while in Babylon. He refused to eat "unclean" food, nor bow down to any statues. He prayed to the true God, even though it was against the law of the land. Daniel was thrown into the lion's den as punishment to this praying. All night and morning, he was protected from being harmed by those hungry cats. God protected him! Daniel was an interpreter of dreams and a prophet.
The Lord kept Daniel safe from the lions and was released by the king because of this miracle. This happened also with Daniel's friends Shadrach, Meshach, and Abednego, when they were thrown into a fiery furnace for refusing to worship a statue of the king ("You shall have no other gods before Me"). The king released them when he realized they were not burning up, but rejoicing in the furnace with another he did not put in there. All of these men were faithful and righteous, even when they were being persecuted. They believed that even if they were not going to be saved from their circumstances, they would not disobey. God chose to save them from those punishments, and they were able to continue to serve Him.
God's answers to our prayers and pleas may not always be "yes". He is still all powerful, and in charge. His promise for His followers is not that we will have an easy life, or that we will escape unfair punishment. He does promise His followers eternal life, even if it is not on this earth. He may not save us from all harm, but He will save us. He promised.
And this is the promise that he made to us—eternal life. 1 John 2:25 (English Standard Version)