The psalmist here tells us, for our instruction, 1. How he was disowned and deserted by his friends, Ps. 142:4. When he was in favour at court he seemed to have a great interest, but when he was made an out-law, and it was dangerous for any one to harbour him (witness Ahimelech’s fate), then no man would know him, but every body was shy of him. He looked on his right hand for an advocate (Ps. 109:31), some friend or other to speak a good word for him; but, since Jonathan’s appearing for him had like to have cost him his life, nobody was willing to venture in defence of his innocency, but all were ready to say they knew nothing of the matter. He looked round to see if any would open their doors to him; but refuge failed him. None of all his old friends would give him a night’s lodging, or direct him to any place of secresy and safety. How many good men have been deceived by such swallow-friends, who are gone when winter comes! David’s life was exceedingly precious, and yet, when he was unjustly proscribed, no man cared for it, nor would move a hand for the protection of it. Herein he was a type of Christ, who, in his sufferings for us, was forsaken of all men, even of his own disciples, and trod the wine-press alone, for there was none to help, none to uphold, Isa. 63:5. 2. How he then found satisfaction in God, Ps. 142:5. Lovers and friends stood aloof from him, and it was in vain to call to them. “But,” said he, “I cried unto thee, O Lord! who knowest me, and carest for me, when none else will, and wilt not fail me nor forsake me when men do;” for God is constant in his love. David tells us what he said to God in the cave: “Thou art my refuge and my portion in the land of the living; I depend upon thee to be so, my refuge to save me from being miserable, my portion to make me happy. The cave I am in is but a poor refuge. Lord, thy name is the strong tower that I run into. Thou art my refuge, in whom alone I shall think myself safe. The crown I am in hopes of is but a poor portion; I can never think myself well provided for till I know that the Lord is the portion of my inheritance and of my cup.” Those who in sincerity take the Lord for their God shall find him all-sufficient both as a refuge and as a portion, so that, as no evil shall hurt them, so no good shall be wanting to them; and they may humbly claim their interest: “Lord, thou art my refuge and my portion; every thing else is a refuge of lies and a portion of no value. Thou art so in the land of the living, that is, while I live and have my being, whether in this world or in a better.” There is enough in God to answer all the necessities of this present time. We live in a world of dangers and wants; but what danger need we fear if God is our refuge, or what wants if he be our portion? Heaven, which alone deserves to be called the land of the living, will be to all believers both a refuge and a portion. 3. How, in this satisfaction, he addressed himself to God (Ps. 142:5, 6): “Lord, give a gracious ear to my cry, the cry of my affliction, the cry of my supplication, for I am brought very low, and, if thou help me not, I shall be quite sunk. Lord, deliver me from my persecutors, either tie their hands or turn their hearts, break their power or blast their projects, restrain them or rescue me, for they are stronger than I, and it will be thy honour to take part with the weakest. Deliver me from them, or I shall be ruined by them, for I am not yet myself a match for them. Lord, bring my soul out of prison, not only bring me safe out of this cave, but bring me out of all my perplexities.” We may apply it spiritually: the souls of good men are often straitened by doubts and fears, cramped and fettered through the weakness of faith and the prevalency of corruption; and it is then their duty and interest to apply themselves to God, and beg of him to set them at liberty and to enlarge their hearts, that they may run the way of his commandments. 4. How much he expected his deliverance would redound to the glory of God. (1.) By his own thanksgivings, into which his present complaints would then be turned: “Bring my soul out of prison, not that I may enjoy myself and my friends and live at ease, no, nor that I may secure my country, but that I may praise thy name.” This we should have an eye to, in all our prayers to God for deliverance out of trouble, that we may have occasion to praise God and may live to his praise. This is the greatest comfort of temporal mercies that they furnish us with matter, and give us opportunity, for the excellent duty of praise. (2.) By the thanksgivings of many on his behalf (2 Cor. 1:11): “When I am enlarged the righteous shall encompass me about; for my cause they shall make thee a crown of praise, so the Chaldee. They shall flock about me to congratulate me on my deliverance, to hear my experiences, and to receive (Maschil) instructions from me; they shall encompass me, to join with me in my thanksgivings, because thou shalt have dealt bountifully with me.” Note, The mercies of others ought to be the matter of our praises to God; and the praises of others, on our behalf, ought to be both desired and rejoiced in by us.