A Psalm of David. This psalm was composed by David when he fled from Absalom his son, according to the title of it in Apollinarius, the Septuagint, Vulgate Latin, Ethiopic, and Arabic versions; so R. Obadiah Gaon: and of the same opinion is Theodoret and others. The sense he had of his sins, and his deprecating God's entering into judgment with him for them, seems to confirm it; affliction from his own family for them being threatened him, Sa2 12:9; though Kimchi thinks it was written on the same account as the former, and at the same time, namely, when he was persecuted by Saul; and what is said in Psa 142:2, seems to agree with it. The Syriac inscription is,

Hear my prayer, O Lord, give ear to my supplications,.... With these requests David begins the psalm; for it was to no purpose to pray and were heard; and for which he always appears to be concerned, as every good man will, and not to be heard only, but to be answered, as follows;

in thy faithfulness answer me, and in thy righteousness; he does not plead his own faith, with which he believed in God, as rama interprets it; though the prayer of faith is very effectual; but the faithfulness of God to his promises; he had promised to hear, answer, and deliver such as called on him in a time of trouble; and he is faithful that has promised, nor will he suffer his faithfulness to fail; he cannot deny himself; and on this the psalmist relied for an answer, as well as desired and expected it; not on account of his own righteousness, but either on account of the goodness and grace of God, sometimes designed by righteousness, or because of the righteousness of Christ, or for the sake of Christ, the Lord our righteousness; on whose account God is just and faithful to forgive sin, the blessing the psalmist wanted, as appears from Psa 143:2.

And enter not into judgment with thy servant,.... The house of judgment, as the Targum, or court of judicature; God is a Judge, and there is and will be a judgment, universal, righteous, and eternal; and there is a day fixed for it, and a judgment seat before which all must stand, and a law according to which all must be judged; but the psalmist knew he was but a man, and could not contend with God; and a sinful creature, and could not answer him for one of a thousand faults committed by him; and though his servant, yet an unprofitable one; his nature, his heart, his thoughts, words, and actions, would not bear examining, nor stand the test of the holy law of God; nor was he able to answer the demands of divine justice in his own person; and therefore pleads for pardon and acceptance through Christ and his righteousness, and entreats that God would not proceed against him in a judicial way, now nor hereafter;

for in thy sight shall no man living be justified; in a legal sense, so as to be acquitted in open court, and not condemned; that is, by the deeds of the law, as the apostle explains it, Rom 3:20; by obedience to it, by a man's own works of righteousness; because these are imperfect, are opposed to the grace of God, and would disannul the death of Christ, and encourage boasting; and much less in the sight of God; for, however men may be justified hereby in their own sight, and before men, in their esteem and account, yet not before God, the omniscient God; who sees not as man sees, and judges not according to the outward appearance, and is perfectly holy and strictly just; and none but the righteousness of Christ can make men righteous, or justify them before him; and this can and does, and presents men unblamable and irreprovable in his sight.

For the enemy hath persecuted my soul,.... Which is to be connected with Psa 143:1; and is a reason why he desires his prayer might be answered, seeing his enemy, either Saul, or Absalom his own son, persecuted him, or pursued him in order to take away his soul, or life; or Satan, the enemy and avenger, who goes about like a roaring lion, seeking whom he may devour; or persecuting men, who are his emissaries and instruments, whom he instigates to persecute the Lord's people, and employs them therein;

he hath smitten my life down to the ground: brought him into a low, mean, and abject state, and near to death; had with a blow struck him to the ground, and left him wallowing in the mire and dirt, just ready to expire. The phrase is expressive of a very distressing state and condition. Some render it "my company" (r); meaning the men that were with him, his soldiers, who were reduced to a low condition with him, and greatly enfeebled and dispirited;

he hath made me to dwell in darkness: in the sides of the cave, as Kimchi; see Sa2 24:3; or in great affliction of body and mind, frequently signified by darkness, as prosperity is by light; he was not only obliged by his enemy to hide himself in woods and wildernesses, and in caves and dens, but was filled with gloomy apprehensions of things, Psa 88:6;

as those that have been long dead; or "of old" (s), an age or two ago, who are out of mind and forgotten, and of whom there is no hope of their coming to life again until the resurrection; or who are "dead for ever" (t); will remain so till that time comes; signifying hereby his hopeless, helpless, and forlorn state and condition; see Psa 31:12.

Therefore is my spirit overwhelmed within me,.... Covered over with grief, borne down with sorrow, ready to sink and fail; See Gill on Psa 142:3;

my heart within me is desolate; destitute of the spirit and presence of God, and with respect to the exercise of grace, and filled with fears and misgivings; or "astonished" (u), at the providence he was under, like one stunned and filled with sore amazement, not knowing what to make of things, or what the issue of them would be; so David's antitype was "sore amazed" in the garden, when his troubles and agonies came upon him, Mar 14:33.

I remember the days of old,.... Former times he had read and heard of, in which the Lord appeared for his people that trusted in him; or the former part of his own life, his younger days, when the Lord delivered him from the lion and bear, and from the uncircumcised Philistine, whom he slew; and made him victorious in battles, and preserved him from the rage and malice of Saul. If this was written on account of Absalom, those times of deliverance he called to mind, in order to encourage his faith and hope, and cheer his drooping spirits;

I meditate on all thy works; I muse on the work of thy hands; the works of creation and providence, in order to observe the instances of divine power, wisdom, and goodness in them; and from thence fetch arguments, to engage his trust and confidence in the Lord: he both thought of these things within himself, and he "talked" (w) of them to his friends that were with him, as the last of these words used may signify; and all this he did to cheer his own spirit, and the spirits of the men that were with him, in the time of distress and danger.

I stretch forth my hands unto thee,.... In prayer, as the Targum adds; for this is a prayer gesture, Kg1 8:38; both hands were stretched forth, earnestly imploring help, and ready to receive and embrace every blessing bestowed with thankfulness;

my soul thirsteth after thee as a thirsty land. As a dry land, which wants water, gapes, and as it were thirsts for rain, which is very refreshing to it; so his soul thirsted after God, after his word and ordinances, after communion with him in them, after his grace and fresh supplies of it; particularly after pardoning grace and mercy, after the coming of Christ, and the blessings of grace by him; as reconciliation, atonement, righteousness, and salvation; after more knowledge of God and Christ, and divine truths; and after the enjoyment of them in heaven to all eternity. Some copies read, "in a thirsty land" (x), and so some versions; see Psa 42:1.

Hear me speedily, O Lord: my spirit faileth,.... Ready to sink, swoon, and faint away, through the weight of the affliction on him, by reason of the persecution of his enemy, and for want of the divine Presence; hence the Targum renders it,

"my spirit desireth thee;''

see Sol 5:6; and therefore entreats that God would hear and answer him quickly; or, "make haste to answer" him, and not delay, lest he should be quite gone. Wherefore it follows,

hide not thy face from me; nothing is more desirable to a good man than the "face" or presence of God, the light of his countenance, and sensible communion with him; which may be said to be "hid" when he withdraws his gracious presence, and withholds the discoveries of his love, and the manifestations of his free grace and favour; which he sometimes does on account of sin, and is the case at times of the best of saints; and is consistent with the love of God, though very grieving to them, and therefore here deprecated: the Targum is,

"cause not thy Shechinah to remove from me;''

lest I be like unto them that go down into the pit; either the house of the grave, as the Targum; look wan and pale, become lifeless and spiritless, or like a dead man; for as in the favour of God is life, his absence is as death: or the pit of hell, the pit of destruction; that is, be in such horror and despair, and under such apprehensions of divine wrath, as the damned feel.

Cause me to hear thy lovingkindness in the morning,.... Not only externally in the ministry of the word; but internally by the Spirit, so as to feel and perceive, and have some sensible experience of it; which he desired he might have in the morning, early, speedily, by the next morning; it being now night perhaps when he was in this distress, and put up this prayer; see Sa2 18:1; Jarchi interprets it, when the redemption arises or springs out; meaning the deliverance of the Jews from their present captivity: and so Kimchi, of the time of salvation; as a time of distress is called the evening;

for in thee do I trust: alone for salvation; being encouraged by his loving kindness, and the goodness of God being for such that trust in him, Psa 36:7; the Targum is,

"in thy Word do I hope;''

cause me to know the way wherein I should walk; either literally, which way he should take to escape his enemies, and get out of danger; or the way and course of his life and conversation, according to the will of God; the way or truth, and path of faith; the way of righteousness and holiness, the way of God's commandments and ordinances; which he desired to have a more distinct knowledge of, and grace to enable him to walk therein;

for I lift up my soul unto thee; "in prayer", as the Targum adds, which this phrase is expressive of; and unless the heart is lifted up to God, and the affections of the soul, and the desires of it, are drawn out unto him, and grace is in exercise on him in prayer, the lifting up of the hands will be of no avail; see Psa 25:1.

Deliver me, O Lord, from mine enemies,.... Either Saul and his courtiers, or Absalom and the conspirators along with him; who were many, and lively and strong, stronger than he; and therefore God only could deliver him, and to him he sought for it, and not to men; and so deliverance from spiritual enemies is only from the Lord;

I flee unto thee to hide me; from their rage and fury; who was the only asylum or place of refuge for him, where he could be safe. It may be rendered, "with thee have I hid" (y); that is, myself: so Arama gives the sense,

"I have hid myself with thee.''

Jarchi, Aben Ezra, and Kimchi, interpret it to this purpose,

"I have hid my affairs, my straits and troubles, my difficulties and necessities, from men; and have revealed them unto thee, who alone can save.''

Teach me to do thy will,.... Revealed in the word; which saints desire a greater knowledge of in order to do it, and in which they delight; and also are desirous of being taught, and to practise submission to the will of God under afflictions; which was now the case of the psalmist;

for thou art my God; his covenant God; and from whom all his afflictions came in a covenant way, and therefore desires to be instructed by him in them; see Jer 31:18;

thy Spirit is good; thy holy good Spirit, as the Targum; the Spirit of thy holiness, as the Arabic version: the Holy Spirit of God is meant, the third Person in the Trinity; who is "good" essentially, being of the same nature and essence with the Father and Son, with God, who is only good; and effectively is the author of the good work of grace upon the heart, and of the several particular graces there implanted, and who performs many good offices to the saints;

lead me into the land of uprightness; or, "let thy good Spirit lead me into the land of uprightness" (z): either into a right land, as the Targum, where honesty prevails, and honest and upright men live; or, "through a plain way" (a), easy to be found, in which he should not err, and where would be no occasion of stumbling; or, "through the way of life", as the Syriac version; the way to eternal life, to heaven and happiness; the land where only truly righteous and upright persons dwell: such will be the new heavens and the new earth, as well as the ultimate state of glory, Pe2 3:13; and to this the Spirit of God is the leader and guide of his people, Psa 48:14.

Quicken me, O Lord, for thy name's sake,.... Being like one dead, Psa 143:3; that is, revive and cheer his drooping spirit, ready to fail, being overwhelmed within him, Psa 143:4; as well as revive the work of grace in him; and quicken his soul to the exercise of grace, and discharge of duty; and this he desires not only for his own soul's good, but for the glory of God, that his name might be hououred, and not blasphemed;

for thy righteousness' sake bring my soul out of trouble; for as he had his bodily troubles and other outward affliction, he had soul troubles, through the corruptions of his nature, the temptations of Satan, and the hidings of God's face; which beset him around, and greatly straitened and afflicted him, and filled him with doubts and fears; from all which he desires deliverance, for the sake of the righteousness of God, or his faithfulness to his promise, that he would deliver his people in distress when they called upon him; See Gill on Psa 143:1. This interprets the meaning of the petition in Psa 142:7.

And of thy mercy cut off mine enemies,.... Which, though an act of vindictive justice, and terrible righteousness to them, would be an act of grace and mercy to him, who thereby would be delivered from them: or, "for thy grace" (b); for the sake of it, for the honour of it, do this; those being, as Cocceius thinks, despisers of the grace of God;

and destroy all them that afflict my soul; by their persecutions, reproaches, and blasphemies. These clauses, with those in Psa 143:11, are read in the future tense, "thou shalt quicken--bring out--cut off--destroy", in the Septuagint, Vulgate Latin, and Arabic versions; and so may be considered as a prophecy of what would be the case of David and his enemies, or of the Messiah and his, here typified; as well as a prayer for those things;

for I am thy servant; by creation, by redemption and grace; and by office, being set upon the throne for the service of God and his people, and therefore pleads for his protection and help; and the rather, as he was the servant of God; and not they, his enemies, as Kimchi observes.