The king in this story, King Darius, was very tolerant of the religious beliefs of those under his rule. He encouraged the Jews to rebuild their sanctuaries and to continue to follow the faith of their ancestors. This is also evident in his willingness to raise Daniel to a position of importance and power.
King Darius recognized Daniel's good work and wanted to raise him to an even higher level of responsibility, a position over the other presidents. You can imagine how the other leaders would feel, he was a foreigner after all! They knew they could not discredit him on professional grounds, so they decided to attack him because of his faith. They appealed to the king's sense of vanity, flattering him with wishes of his eternal life. They told him he should make it illegal for anyone to pray to anyone else but him. And this he did.
You can imagine how glad the other leaders were. They knew Daniel would continue to pray to his God and as soon as he did they told the king. He did not want to throw Daniel in the lion's den but they told him the law was written so that it could not be changed. When Daniel was placed in the den he told him he hoped his God could save him. And save him He did. Daniel was unharmed the next morning when they opened the den! The king decreed that all would must now recognize Daniel's God as the Living God.
It is often seen in a restrictive government that there are officials who behave the ways these presidents did. Think of the communist regimes that encouraged neighbors to report on each other. Or even more recently, when China strong armed Yahoo! into telling them the names of dissidents or lose their ability to do business in China. King Darius proclaims God's indestructibility in his statement: For He is the Living God, enduring forever. His Kingdom shall never be destroyed. God will outlast repressive regimes and be there with us at all times.