Historical commentary by Matthew Henry. The wording and interpretations below belong to the original source.
Prayer for Deliverance; Profession of Confidence in God.
Faith and prayer must go together. He that believes, let him pray— I believe, therefore I have spoken: and he that prays, let him believe, for the prayer of faith is the prevailing prayer. We have both here.
I. David, in distress, is very earnest with God in prayer for succour and relief. This eases a burdened spirit, fetches in promised mercies, and wonderfully supports and comforts the soul in the expectation of them. He prays, 1. That God would deliver him ( v. 1 ), that his life might be preserved from the malice of his enemies, and that an end might be put to their persecutions of him, that God, not only in his mercy, but in righteousness, would deliver him, as a righteous Judge betwixt him and his unrighteous persecutors, that he would bow down his ear to his petitions, to his appeals, and deliver him, v. 2 . It is condescension in God to take cognizance of the case of the greatest and best of men; he humbles himself to do it. The psalmist prays also that he would deliver him speedily, lest, if the deliverance were long deferred, his faith should fail. 2. That if he did not immediately deliver him out of his troubles, yet he would protect and shelter him in his troubles; " Be thou my strong rock, immovable, impregnable, as a fastness framed by nature, and my house of defence, a fortress framed by art, and all to save me. " Thus we may pray that God's providence would secure to us our lives and comforts, and that by his grace we may be enabled to think ourselves safe in him, Prov. xviii. 10 . 3. That his case having much in it of difficulty, both in respect of duty and in respect of prudence, he might be under the divine guidance: " Lord, lead me and guide me ( v. 3 ), so order my steps, so order my spirit, that I may never do any thing unlawful and unjustifiable—against my conscience, nor unwise and indiscreet—against my interest." Those that resolve to follow God's direction may in faith pray for it. 4. That his enemies being very crafty, as well as very spiteful, God would frustrate and baffle their designs against him ( v. 4 ): " Pull me out of the net that they have laid privily for me, and keep me from the sin, the trouble, the death, they aim to entrap me in."
II. In this prayer he gives glory to God by a repeated profession of his confidence in him and dependence on him. This encouraged his prayers and qualified him for the mercies he prayed for ( v. 1 ): " In thee, O Lord! do I put my trust, and not in myself, or any sufficiency of my own, or in any creature; let me never be ashamed, let me not be disappointed of any of that good which thou hast promised me and which therefore I have promised myself in thee." 1. He had chosen God for his protector, and God had, by his promise, undertaken to be so ( v. 3 ): " Thou art my rock and my fortress, by thy covenant with me and my believing consent to that covenant; therefore be my strong rock, " v. 2 . Those that have in sincerity avouched the Lord for theirs may expect the benefit of his being so; for God's relations to us carry with them both name and thing. Thou art my strength, v. 4 . If God be our strength, we may hope that he will both put his strength in us and put forth his strength for us. 2. He gave up his soul in a special manner to him ( v. 5 ): Into thy hands I commit my spirit. (1.) If David here looks upon himself as a dying man, by these words he resigns his departing soul to God who gave it, and to whom, at death, the spirit returns. "Men can but kill the body, but I trust in God to redeem my soul from the power of the grave, " Ps. xlix. 15 . He is willing to die if God will have it so; but let my soul fall into the hands of the Lord, for his mercies are great. With these words our Lord Jesus yielded up the ghost upon the cross, and made his soul an offering, a free-will offering for sin, voluntarily laying down his life a ransom. By Stephen's example we are taught in, our dying moment, to eye Christ at God's right hand, and to commit our spirits to him: Lord Jesus, receive my spirit. But, 2. David is here to be looked upon as a man in distress and trouble. And, [1.] His great care is about his soul, his spirit, his better part. Note, Our outward afflictions should increase our concern for our souls. Many think that while they are perplexed about their worldly affairs, and Providence multiplies their cares about them, they may be excused if they neglect their souls; whereas the greater hazard our lives and secular interests lie at the more we are concerned to look to our souls, that, though the outward man perish, the inward man may suffer no damage ( 2 Cor. iv. 16 ), and that we may keep possession of our souls when we can keep possession of nothing else, Luke xxi. 19 . [2.] He thinks the best he can do for the soul is to commit it into the hand of God, and lodge that great trust with him. He had prayed ( v. 4 ) to be plucked out of the net of outward trouble, but, as not insisting upon that (God's will be done), he immediately lets fall that petition, and commits the spirit, the inward man, into God's hand. "Lord, however it goes with me, as to my body, let it go well with my soul." Note, It is the wisdom and duty of every one of us solemnly to commit our spirits into the hands of God, to be sanctified by his grace, devoted to his honour, employed in his service, and fitted for his kingdom. That which encourages us to commit our spirits into the hand of God is that he has not only created, but redeemed, them; the particular redemptions of the Old-Testament church and the Old-Testament saints were typical of our redemption by Jesus Christ, Gen. xlviii. 16 . The redemption of the soul is so precious that it must have ceased for ever if Christ had not undertaken it; but, by redeeming our souls, he has not only acquired an additional right and title to them, which obliges us to commit them to him as his own, but has shown the extraordinary kindness and concern he has for them, which encourages us to commit them to him, to be preserved to his heavenly kingdom ( 2 Tim. i. 12 ): " Thou hast redeemed me, O Lord God of truth! redeem me according to a promise which thou wilt be true to."