This psalm is a prayer. As there is a time to weep and a time to rejoice, so there is a time for praise and a time for prayer. David was now persecuted, probably by Saul, who hunted him like a partridge on the mountains; without were fightings, within were fears, and both urged him as a suppliant to the throne of mercy. He addresses himself to God in these verses both by way of appeal (Hear the right, O Lord! let my righteous cause have a hearing before thy tribunal, and give judgment upon it) and by way of petition (Give ear unto my prayer Ps. 17:1; and again Ps. 17:6; Incline thy ear unto me and hear my speech); not that God needs to be thus pressed with our importunity, but he gives us leave thus to express our earnest desire of his gracious answers to our prayers. These things he pleads with God for audience, 1. That he was sincere, and did not dissemble with God in his prayer: It goeth not out of feigned lips. He meant as he spoke, and the feelings of his mind agreed with the expressions of his mouth. Feigned prayers are fruitless; but, if our hearts lead our prayers, God will meet them with his favour. 2. That he had been used to pray at other times, and it was not his distress and danger that now first brought him to his duty: “I have called upon thee formerly (Ps. 17:6); therefore, Lord, hear me now.” It will be a great comfort to us if trouble, when it comes, find the wheels of prayer a-going, for then we may come with the more boldness to the throne of grace. Tradesmen are willing to oblige those that have been long their customers. 3. That he was encouraged by his faith to expect God would take notice of his prayers: “I know thou wilt hear me, and therefore, O God, incline thy ear to me.” Our believing dependence upon God is a good plea to enforce our desires towards him. Let us now see,
I. What his appeal is; and here observe,
1. What the court is to the cognizance and determination of which he makes his appeal; it is the court of heaven. “Lord, do thou hear the right, for Saul is so passionate, so prejudiced, that he will not hear it. Lord, let my sentence come forth from thy presence, Ps. 17:2. Men sentence me to be pursued and cut off as an evil-doer. Lord, I appeal from them to thee.” This he did in a public remonstrance before Saul’s face (1 Sam. 24:12; The Lord judge between me and thee), and he repeats it here in his private devotions. Note, (1.) The equity and extent of God’s government and judgment are a very great support to injured innocency. If we are blackened, and abused, and misrepresented, by unrighteous men, it is a comfort that we have a righteous God to go to, who will take our part, who is the patron of the oppressed, whose judgment is according to truth, by the discoveries of which every person and every cause will appear in a true light, stripped of all false colours, and by the decisions of which all unrighteous dooms will be reversed, and to every man will be rendered according to his work. (2.) Sincerity dreads no scrutiny, no, not that of God himself, according to the tenour of the covenant of grace: Let thy eyes behold the things that are equal. God’s omniscience is as much the joy of the upright as it is the terror of hypocrites, and is particularly comfortable to those who are falsely accused and in any wise have wrong done them.
2. What the evidence is by which he hopes to make good his appeal; it is the trial God had made of him (Ps. 17:3): Thou hast proved my heart. God’s sentence is therefore right, because he always proceeds upon his knowledge, which is more certain and infallible than that which men attain to by the closest views and the strictest investigations.
(1.) He knew God had tried him, [1.] By his own conscience, which is God’s deputy in the soul. The spirit of a man is the candle of the Lord, with this God had searched him, and visited him in the night, when he communed with his own heart upon his bed. He had submitted to the search, and had seriously reviewed the actions of his life, to discover what was amiss, but could find nothing of that which his enemies charged him with. [2.] By providence. God had tried him by the fair opportunity he had, once and again, to kill Saul; he had tried him by the malice of Saul, the treachery of his friends, and the many provocations that were given him; so that, if he had been the man he was represented to be, it would have appeared; but, upon all these trials, there was nothing found against him, no proof at all of the things whereof they accused him.
(2.) God tried his heart, and could witness to the integrity of that; but, for the further proof of his integrity, he himself takes notice of two things concerning which his conscience bore him record:—[1.] That he had a fixed resolution against all sins of the tongue: “I have purposed and fully determined, in the strength of God’s grace, that my mouth shall not transgress.” He does not say, “I hope that it will not,” or, “I wish that it may not,” but, “I have fully purposed that it shall not:” with this bridle he kept his mouth, Ps. 39:1. Note, Constant resolution and watchfulness against sins of the tongue will be a good evidence of our integrity. If any offend not in word, the same is a perfect man, Jas. 3:2. He does not say, “My mouth never shall transgress” (for in many things we all offend), but, “I have purposed that it shall not;” and he that searches the heart knows whether the purpose be sincere. [2.] That he had been as careful to refrain from sinful actions as from sinful words (Ps. 17:4): “Concerning the common works of men, the actions and affairs of human life, I have, by the direction of thy word, kept myself from the paths of the destroyer.” Some understand it particularly, that he had not been himself a destroyer of Saul, when it lay in his power, nor had he permitted others to be so, but said to Abishai, Destroy him not, 1 Sam. 26:9. But it may be taken more generally; he kept himself from all evil works, and endeavoured, according to the duty of his place, to keep others from them too. Note, First, The ways of sin are paths of the destroyer, of the devil, whose name is Abaddon and Apollyon, a destroyer, who ruins souls by decoying them into the paths of sin. Secondly, It concerns us all to keep out of the paths of the destroyer; for, if we walk in those ways that lead to destruction, we must thank ourselves if destruction and misery be our portion at last. Thirdly, It is by the word of God, as our guide and rule, that we must keep out of the paths of the destroyer, by observing its directions and admonitions, Ps. 119:9. Fourthly, If we carefully avoid all the paths of sin, it will be very comfortable in the reflection, when we are in trouble. If we keep ourselves, that the wicked one touch us not with his temptations (1 John 5:18), we may hope he will not be able to touch us with his terrors.
II. What his petition is; it is, in short, this, That he might experience the good work of God in him, as an evidence of and qualification for the good will of God towards him: this is grace and peace from God the Father. 1. He prays for the work of God’s grace in him (Ps. 17:5): “Hold up my going in thy paths. Lord, I have, by thy grace, kept myself from the paths of the destroyer; by the same grace let me be kept in thy paths; let me not only be restrained from doing that which is evil, but quickened to abound always in that which is good. Let my goings be held in thy paths, that I may not turn back from them nor turn aside out of them; let them be held up in thy paths, that I may not stumble and fall into sin, that I may not trifle and neglect my duty. Lord, as thou hast kept me hitherto, so keep me still.” Those that are, through grace, going in God’s paths, have need to pray, and do pray, that their goings may be held up in those paths; for we stand no longer than he is pleased to hold us, we go no further than he is pleased to lead us, bear us up, and carry us. David had been kept in the way of his duty hitherto, and yet he does not think that this would be his security for the future, and therefore prays, “Lord, still hold me up.” Those that would proceed and persevere in the way of God must, by faith and prayer, fetch in daily fresh supplies of grace and strength from him. David was sensible that his way was slippery, that he himself was weak, and not so well fixed and furnished as he should be, that there were those who watched for his halting and would improve the least slip against him, and therefore he prays, “Lord, hold me up, that my foot slip not, that I may never say nor do any thing that looks either dishonest or distrustful of thee and thy providence and promise.” 2. He prays for the tokens of God’s favour to him, Ps. 17:7. Observe here, (1.) How he eyes God as the protector and Saviour of his people, so he calls him, and thence he takes his encouragement in prayer: O thou that savest by thy right hand (by thy own power, and needest not the agency of any other) those who put their trust in thee from those that rise up against them. It is the character of God’s people that they trust in him; he is pleased to make them confidants, for his secret is with the righteous; and they make him their trust, for to him they commit themselves. Those that trust in God have many enemies, many that rise up against them and seek their ruin; but they have one friend that is able to deal with them all, and, if he be for them, no matter who is against them. He reckons it his honour to be their Saviour. His almighty power is engaged for them, and they have all found him ready to save them. The margin reads it, O thou that savest those who trust in thee from those that rise up against thy right hand. Those that are enemies to the saints are rebels against God and his right hand, and therefore, no doubt, he will, in due time, appear against them. (2.) What he expects and desires from God: Show thy marvellous loving-kindness. The word signifies, [1.] Distinguishing favours. “Set apart thy loving-kindnesses for me; put me not off with common mercies, but be gracious to me, as thou usest to do to those who love thy name.” [2.] Wonderful favours. “O make thy loving-kindness admirable! Lord, testify thy favour to me in such a way that I and others may wonder at it.” God’s loving-kindness is marvellous for the freeness and the fulness of it; in some instances it appears, in a special manner, marvellous (Ps. 118:23), and it will certainly appear so in the salvation of the saints, when Christ shall come to be glorified in the saints and to be admired in all those that believe.