In the first year that Darius was king, Daniel happened to be reading the prophesies of Jeremiah and observed that the seventy year time period of the desolations of Jerusalem was almost complete (Jer. 25:11, 12). So Daniel, with a great anticipation of the release of the exiles, sought the Lord in this prayer with fasting, sackcloth and ashes.
3 Then I set my face toward the Lord God to make request by prayer and supplications, with fasting, sackcloth, and ashes. 4 And I prayed to the Lord my God, and made confession, and said, “O Lord, great and awesome God, who keeps His covenant and mercy with those who love Him, and with those who keep His commandments, 5 we have sinned and committed iniquity, we have done wickedly and rebelled, even by departing from Your precepts and Your judgments. 6 Neither have we heeded Your servants the prophets, who spoke in Your name to our kings and our princes, to our fathers and all the people of the land. 7 O Lord, righteousness belongs to You, but to us shame of face, as it is this day — to the men of Judah, to the inhabitants of Jerusalem and all Israel, those near and those far off in all the countries to which You have driven them, because of the unfaithfulness which they have committed against You.
8 “O Lord, to us belongs shame of face, to our kings, our princes, and our fathers, because we have sinned against You. 9 To the Lord our God belong mercy and forgiveness, though we have rebelled against Him. 10 We have not obeyed the voice of the Lord our God, to walk in His laws, which He set before us by His servants the prophets. 11 Yes, all Israel has transgressed Your law, and has departed so as not to obey Your voice; therefore the curse and the oath written in the Law of Moses the servant of God have been poured out on us, because we have sinned against Him. 12 And He has confirmed His words, which He spoke against us and against our judges who judged us, by bringing upon us a great disaster; for under the whole heaven such has never been done as what has been done to Jerusalem.
13 “As it is written in the Law of Moses, all this disaster has come upon us; yet we have not made our prayer before the Lord our God, that we might turn from our iniquities and understand Your truth. 14 Therefore the Lord has kept the disaster in mind, and brought it upon us; for the Lord our God is righteous in all the works which He does, though we have not obeyed His voice. 15 And now, O Lord our God, who brought Your people out of the land of Egypt with a mighty hand, and made Yourself a name, as it is this day — we have sinned, we have done wickedly!
16 “O Lord, according to all Your righteousness, I pray, let Your anger and Your fury be turned away from Your city Jerusalem, Your holy mountain; because for our sins, and for the iniquities of our fathers, Jerusalem and Your people are a reproach to all those around us. 17 Now therefore, our God, hear the prayer of Your servant, and his supplications, and for the Lord’s sake cause Your face to shine on Your sanctuary, which is desolate. 18 O my God, incline Your ear and hear; open Your eyes and see our desolations, and the city which is called by Your name; for we do not present our supplications before You because of our righteous deeds, but because of Your great mercies. 19 O Lord, hear! O Lord, forgive! O Lord, listen and act! Do not delay for Your own sake, my God, for Your city and Your people are called by Your name.”
He began his prayer with great praise to God. He prayed, “O Lord, great and awesome God, who keeps His covenant and mercy with those who love Him, and with those who keep His commandments.” Then Daniel, knowing that he and all Israel had not kept His commandments, proceeded in his prayer to confess sin, iniquity, wickedness, and rebellion (v. 5).
The prayer sets before God a contrast between a righteous, holy, and faithful God and a sinful and rebellious people. Thus (in v. 7) Daniel prayed, “Righteousness belongs to You, but to us shame of face.” Hence, when Daniel requested that God turn away His anger and wrath against Jerusalem (v. 16), and to bring Israel back into the land, he prayed not according to their own merits, but rather according to God’s great compassion (v. 18).
This prayer of Daniels pleads for God’s mercy based on His own faithfulness and not according to their love for Him, because Daniel feared that their love for Him was sadly lacking. So Daniel cried out, begging for God’s mercy to forgive them and to deliver them for His own sake, and because His City and His people were called by His name (v. 19).