The matter of this Psalm plainly showeth that it was written in a time of David’s great distress, and his old age, mentioned Psa_71:9 and Psa_71:18 which proves that it belongs not to Saul’s time, but rather to the time of Absalom’s rebellion, which happened in his old age.
The psalmist, in confidence of his faith, and in experience of past favours, prayeth unto God to deliver him, but consume his enemies, Psa_71:1-13; promising constancy of hope in him, Psa_71:14-16; praying for his persevering strength and power, Psa_71:17,18; acknowledgeth his troubles to be from God, Psa_71:19-21; Promiseth thankfulness to him for his deliverance, Psa_71:22-24.
This verse and the next are taken out of Psa_31:1,2.