1 O Lord, you have searched me and known me!
2 You know when I sit down and when I rise up;
you discern my thoughts from afar.
3 You search out my path and my lying down
and are acquainted with all my ways.
4 Even before a word is on my tongue,
behold, O Lord, you know it altogether.
5 You hem me in, behind and before,
and lay your hand upon me.
6 Such knowledge is too wonderful for me;
it is high; I cannot attain it. 
139:5 “And there is no creature hidden from His sight, but all things are naked and open to the eyes of Him to whom we must give account” (Heb. 4:13). And because His knowledge of us is so inconceivably absolute, He can guard us behind and before. Ever and always His hand is laid protectingly upon us.
139:5 enclosed me. God used circumstances to limit David’s actions.
139:5 lay your hand upon me. A gentle gesture (cf. Gen. 48:14, 17), giving reassurance.
139:5 You barricade me It is unclear what connotation the psalmist intends when using the Hebrew word tsur here; it can mean “to bind,” “encircle,” or “lay siege to.” In Ps 139:6, the psalmist indicates that he accepts close scrutiny from God, but that he does not understand it.
139:5 You hem me in. The Lord sets His limits around the psalmist’s actions.
The Lord’s Discernment of Individuals (139:1–6)
1–6 The Lord “knows” his own. The knowledge of God is relational. He knows his own (see 1:6), as he discerns the righteous from the wicked (cf. vv. 19–20). The root ydʿ (“know”) occurs throughout this section: “you know me … you know when … you know it completely … such knowledge.” It signifies here divine discernment. The Lord discerns the actions of his own (v. 1), whether they sit or stand (v. 2; see 1:6). This discernment belongs uniquely to God, who alone is the Judge of all flesh. Hence the psalmist exclaims that this divine prerogative is beyond him: “Such knowledge is too wonderful for me” (v. 6).
In his prayer (vv. 23–24), which gives expression to his recommitment, the psalmist prayed for the Lord’s justification of his acts against those who maligned him. He prayed for the Lord to examine him as in a judicial case and to declare him innocent of the charges (vv. 23–24; see comments there). Now that the ordeal is over and he has been justified by the Lord, the psalmist testifies that the Lord is a righteous judge. He has come to a new level of relationship with the Lord, who knows him through and through: “you have searched me” (v. 1; cf. 7:9; 17:3; 26:2; Jer 17:10), “you know” (vv. 1–2, 4; see above), “you perceive” (bîn, v. 2; or “you have an understanding of”), “you discern” (v. 3, or “you have winnowed me”), and “you are familiar with.” The Lord knows his every move (“when I sit and when I rise,” v. 2).
But the accused is not afraid of his judge. The divine Judge is more than an arbiter, because he is also the one in whom the psalmist has found protection. He hedges in his own for the purpose of protection (“behind and before,” v. 5). This thought receives further amplification in v. 5b: “you have laid your hand upon me.” The placement of the divine hand signifies protection and blessing (cf. Ge 48:14, 17; Ex 33:22).
This knowledge of God is nothing less than a knowledge that discerns and discriminates in favor of those who are loyal to the Lord. The discerning and favorable acts of God are gracious. It is grace that justifies, and it is by grace that humans are blessed. Though the psalmist has taken seriously his responsibilities in all of his ways (his sitting, rising, going out, lying down, and speaking; cf. vv. 2–4), still he exclaims that God’s favorable acts toward him are “too wonderful” and “too lofty” to apprehend (v. 6; cf. Ro 11:33; see Reflections, p. 603, The Mighty Acts of Yahweh).
139:1–6 / Verses 1–12 hymn the comprehensive nature of God’s knowledge and presence: from sitting to rising (v. 2), from activity (going out) to inactivity (lying down, v. 3), from the heavens to the depths (i.e., vertical space, v. 8), from the east (“the wings of the dawn”) to the west (“the far side of the sea,” i.e., horizontal space, v. 9), and from darkness and night to light and day (vv. 11–12).
The opening section of the psalm begins with a general confession that you know me. But even this general statement about divine omniscience does not indicate an automatic comprehension: you have searched me. The Hebrew verb behind you discern (Hb. zrh) my going out and my lying down is normally used for “winnowing” or “sifting” wheat. God himself participates in the process of becoming acquainted with us. His knowledge is not static; it too goes through a dynamic process. Examples of what God knows then follow. The various postures one takes during the day point to the various activities one may engage in. God’s knowledge goes beyond mere activity to my thoughts and my ways. One’s speech is also singled out as an area of divine interest. God’s comprehension is comprehensive, both around and over us (v. 5). And so our ability to comprehend is limited, such knowledge is beyond us (v. 6). It is difficult to know whether God’s actions in verse 5 are comforting or oppressive (e.g., Hb. ṣwr, hem … in, is often used in the ot for “besieging,” and God’s hand upon a person can denote affliction, cf. 38:2). The verse may be intentionally ambiguous, though we should note from the next section that the speaker’s immediate response is one of flight.
Exposure to God’s scrutiny (139:1b–6). The speaker of the psalm has come to the sanctuary to present his prayer, hoping for a divine oracle to vindicate him. He protests his innocence of certain charges evidently brought against him, before Yahweh who has insight into the whole of his life. Every detail of his daily routine, every unspoken thought, is known to God, who knows him inside and out, as the alternating parallelism of vv 2a and 3 and vv 2b and 4 conveys. In the OT such terms as “know” (ידע), “examine” (חקר), “see” (ראה) in vv 16, 24, and “probe” (בחן) in v 23 are used with God as subject to refer to a providential role as judge—not necessarily in a formal sense but by way of metaphor—punishing the guilty and acquitting the innocent. These associations of the terms used in the psalm indicate that the psalmist is in some situation of attack. The psalm is comparable with Jeremiah’s appeal for vindication: “You know me, Yahweh; you see me and probe my attitude toward you. Pull them out like sheep for the slaughter” (Jer 12:3 [author’s translation]; cf. Jer 15:15). The psalmist is not engaged in quiet reverie on a divine attribute but pleading for justice to be done. A polemical element is implicit from the outset.
Yahweh is “far away” (מרחוק) as the transcendent God who observes all from heaven (cf. Ps 11:4–5; Jer 23:23). He is also close by, surrounding the psalmist and controlling his movements. The psalmist reacts to God’s omniscience with wonder: it is beyond his ken and too sublime to comprehend. In the area of knowledge a gulf lies between Yahweh and himself. He is driven to avow his own sense of limitation and inadequacy (cf. Job 42:2, 3b). Kras̆ovec (BZ 18  232–33) studied the polar expressions used in the psalm to express totality: in vv 2a, 3a, 5a they are used within single cola, while in vv 8, 9, 11 they extend to whole lines. In this connection Holman (VT 21  301) noted the contrast between the human and divine representations in vv 1–12. On the one hand there is the multiplicity of the psalmist’s activities and the agitation of various human possibilities; on the other is the majestic superiority of God’s knowledge, expressed in sober, calm tones, comprehending everything by the mere fact of presence.
The force of the expressions in v 5 is ambiguous. The verb צור used in v 5a is often used in a hostile sense “besiege,” but it can be employed of enclosing for safekeeping. Similarly Yahweh’s כף, “palm,” or hand, can refer to loving care or to punishment. Probably the verse is to be pressed to neither extreme but is simply a neutral statement of God’s absolute control of the psalmist’s movements (Dahood, 288).
1–6 God the all-knowing: from inner thoughts to outer ways. These verses are full of verbs of ‘knowing’. The general statement of v 1 is applied to life’s outward activities and inner thoughts (2), everyday acts and lifestyle (3, ways), and unexpressed thoughts (4). Personal life falls wholly within divine limits, behind, before and over, (5, ‘You cup your hand over me’—a picture which reveals that it is all for my protection and comfort Jn. 10:27–30).
139:1–5 You have searched me: God is active to search and test His servants. He knows our motives, desires, and words before they are expressed. In short, He knows His servants completely. But as v. 5 makes clear, the purpose of His intimate knowledge of His servants is protective and helpful, not judgmental and condemning.
139:6 such knowledge: Here the poet gasps aloud at the wonder of the intimate relationship He has with God, and God with him. It is simply too much to comprehend; the human mind with all its ability is no match for the mind of God!
139:5–6. David’s initial response to this staggering knowledge was that he was troubled. Like many who respond to the fact of God’s omniscience, he thought it was confining, that God had besieged him and cupped His hand over him.
Moreover, this kind of knowledge was out of David’s control—it was too wonderful for him. The word “wonderful” is in the emphatic position, at the beginning of the sentence. On the meaning of “wonderful” as “extraordinary or surpassing,” see comments on 9:1. In other words divine omniscience is too high for humans to comprehend (also cf. comments on 139:14).
 The Holy Bible: English Standard Version. (2016). (Ps 139:1–6). Wheaton: Standard Bible Society.
 MacDonald, W. (1995). Believer’s Bible Commentary: Old and New Testaments. (A. Farstad, Ed.) (p. 769). Nashville: Thomas Nelson.
 MacArthur, J. F., Jr. (2006). The MacArthur study Bible: New American Standard Bible. (Ps 139:5). Nashville, TN: Thomas Nelson Publishers.
 Crossway Bibles. (2008). The ESV Study Bible (p. 1116). Wheaton, IL: Crossway Bibles.
 Barry, J. D., Mangum, D., Brown, D. R., Heiser, M. S., Custis, M., Ritzema, E., … Bomar, D. (2012, 2016). Faithlife Study Bible (Ps 139:5). Bellingham, WA: Lexham Press.
 Sproul, R. C. (Ed.). (2005). The Reformation Study Bible: English Standard Version (p. 860). Orlando, FL; Lake Mary, FL: Ligonier Ministries.
 VanGemeren, W. A. (2008). Psalms. In T. Longman III & D. E. Garland (Eds.), The Expositor’s Bible Commentary: Psalms (Revised Edition) (Vol. 5, pp. 959–960). Grand Rapids, MI: Zondervan.
 Hubbard, R. L. J., & Johnston, R. K. (2012). Foreword. In W. W. Gasque, R. L. Hubbard Jr., & R. K. Johnston (Eds.), Psalms (pp. 484–485). Grand Rapids, MI: Baker Books.
 Allen, L. C. (2002). Psalms 101–150 (Revised) (Vol. 21, pp. 327–328). Dallas: Word, Incorporated.
 Motyer, J. A. (1994). The Psalms. In D. A. Carson, R. T. France, J. A. Motyer, & G. J. Wenham (Eds.), New Bible commentary: 21st century edition (4th ed., p. 578). Leicester, England; Downers Grove, IL: Inter-Varsity Press.
 Radmacher, E. D., Allen, R. B., & House, H. W. (1999). Nelson’s new illustrated Bible commentary (p. 738). Nashville: T. Nelson Publishers.
 Ross, A. P. (1985). Psalms. In J. F. Walvoord & R. B. Zuck (Eds.), The Bible Knowledge Commentary: An Exposition of the Scriptures (Vol. 1, p. 891). Wheaton, IL: Victor Books.