“Therefore, O king, let my counsel be acceptable to you: break off your sins by practicing righteousness, and your iniquities by showing mercy to the oppressed, that there may perhaps be a lengthening of your prosperity.” Daniel 4:27
Nebuchadnezzar was king of the Neo-Babylonian Empire, which had conquered most of the Middle East. This included the Kingdom of Judah (Israel had already been conquered by the Assyrians, whom the Babylonians supplanted). Daniel was a Hebrew, and thus a captive of the Empire. But he was an important political official, and the king relied on him to interpret dreams, since God gave Daniel prophetic power. The above passage is at the end of Daniel’s interpretation of a dream: Nebuchadnezzar, ruler of much of the known world, would be humiliated. But, if he follows Daniel’s advice, he might be spared.