18 “This is the dream that I, King Nebuchadnezzar, had. Now, Belteshazzar, tell me what it means, for none of the wise men in my kingdom can interpret it for me. But you can, because the spirit of the holy gods is in you.”
19 Then Daniel (also called Belteshazzar) was greatly perplexed for a time, and his thoughts terrified him. So the king said, “Belteshazzar, do not let the dream or its meaning alarm you.”
Belteshazzar answered, “My lord, if only the dream applied to your enemies and its meaning to your adversaries! 20 The tree you saw, which grew large and strong, with its top touching the sky, visible to the whole earth, 21 with beautiful leaves and abundant fruit, providing food for all, giving shelter to the wild animals, and having nesting places in its branches for the birds— 22 Your Majesty, you are that tree! You have become great and strong; your greatness has grown until it reaches the sky, and your dominion extends to distant parts of the earth.
23 “Your Majesty saw a holy one, a messenger, coming down from heaven and saying, ‘Cut down the tree and destroy it, but leave the stump, bound with iron and bronze, in the grass of the field, while its roots remain in the ground. Let him be drenched with the dew of heaven; let him live with the wild animals, until seven times pass by for him.’
24 “This is the interpretation, Your Majesty, and this is the decree the Most High has issued against my lord the king: 25 You will be driven away from people and will live with the wild animals; you will eat grass like the ox and be drenched with the dew of heaven. Seven times will pass by for you until you acknowledge that the Most High is sovereign over all kingdoms on earth and gives them to anyone he wishes. 26 The command to leave the stump of the tree with its roots means that your kingdom will be restored to you when you acknowledge that Heaven rules. 27 Therefore, Your Majesty, be pleased to accept my advice: Renounce your sins by doing what is right, and your wickedness by being kind to the oppressed. It may be that then your prosperity will continue.”
28 All this happened to King Nebuchadnezzar. 29 Twelve months later, as the king was walking on the roof of the royal palace of Babylon, 30 he said, “Is not this the great Babylon I have built as the royal residence, by my mighty power and for the glory of my majesty?”
31 Even as the words were on his lips, a voice came from heaven, “This is what is decreed for you, King Nebuchadnezzar: Your royal authority has been taken from you. 32 You will be driven away from people and will live with the wild animals; you will eat grass like the ox. Seven times will pass by for you until you acknowledge that the Most High is sovereign over all kingdoms on earth and gives them to anyone he wishes.”
33 Immediately what had been said about Nebuchadnezzar was fulfilled. He was driven away from people and ate grass like the ox. His body was drenched with the dew of heaven until his hair grew like the feathers of an eagle and his nails like the claws of a bird.
34 At the end of that time, I, Nebuchadnezzar, raised my eyes toward heaven, and my sanity was restored. Then I praised the Most High; I honored and glorified him who lives forever.
His dominion is an eternal dominion;
his kingdom endures from generation to generation.
35 All the peoples of the earth
are regarded as nothing.
He does as he pleases
with the powers of heaven
and the peoples of the earth.
No one can hold back his hand
or say to him: “What have you done?”
36 At the same time that my sanity was restored, my honor and splendor were returned to me for the glory of my kingdom. My advisers and nobles sought me out, and I was restored to my throne and became even greater than before. 37 Now I, Nebuchadnezzar, praise and exalt and glorify the King of heaven, because everything he does is right and all his ways are just. And those who walk in pride he is able to humble.
See also James 4:6-10.