When David was in the Cave
1-2, Distress Declared to Yahweh 3-4, No Place to Hide 5-7, You Are My Refuge
(142:5) I cried out to You, O LORD: I said, "You are my refuge, my portion in the land of the living." (142:1) I cry out to the LORD with my voice; with my voice to the LORD I make my supplication.
The only psalm in Books 4 or 5 with historical information in its superscription, David apparently wrote Ps 142 in response to the situation “when he was in the cave.” He begins with earnest prayer in verses 1–2 (MT 2–3), elaborates on how he had no place to hide in verses 3–4, and in verses 5–7 returns to prayer, asserting that Yahweh is his only refuge.