This psalm appears to be a continuation of Psalm 70, which bears the superscription “Of David. ” So David likely made the request we read at Psalm 71: 9.
تَوَسَّلَ ٱلْمُرَنِّمُ ٱلْمُلْهَمُ فِي ٱلْمَزْمُور ٧١ :‏ ٩ إِلَى ٱللهِ ،‏ قَائِلًا :‏ « لَا تَطْرَحْنِي فِي زَمَنِ ٱلشَّيْخُوخَةِ ،‏ لَا تَتْرُكْنِي عِنْدَ فَنَاءِ قُوَّتِي » .‏