14 When Arioch, the commander of the king's guard, had gone out to put to death the wise men of Babylon, Daniel spoke to him with wisdom and tact. 15 He asked the king's officer, "Why did the king issue such a harsh decree?" Arioch then explained the matter to Daniel. 16 At this, Daniel went in to the king and asked for time, so that he might interpret the dream for him. 17 Then Daniel returned to his house and explained the matter to his friends Hananiah, Mishael and Azariah. 18 He urged them to plead for mercy from the God of heaven concerning this mystery, so that he and his friends might not be executed with the rest of the wise men of Babylon. 19 During the night the mystery was revealed to Daniel in a vision. Then Daniel praised the God of heaven 20 and said: "Praise be to the name of God for ever and ever; wisdom and power are his. 21 He changes times and seasons; he deposes kings and raises up others. He gives wisdom to the wise and knowledge to the discerning. 22 He reveals deep and hidden things; he knows what lies in darkness, and light dwells with him. 23 I thank and praise you, God of my ancestors: You have given me wisdom and power, you have made known to me what we asked of you, you have made known to us the dream of the king."