We have no idea how long David spent in the desert on this occasion. How many nights did he spend out in the wilderness, at risk from animals and his foes alike? Yet, David found ways to strengthen himself in the Lord, even under the onslaught of devastating betrayal and attack. In his youth it had been from King Saul, and it had been from raiders at Ziklag, when even his own people were speaking of stoning him, and then there was this dreadful time when his own son led a full-scale rebellion against him. But always, David turned to the Lord. (1 Sam. 23:14; 30:6; 2 Sam. 15:23)
When pangs of despair press in hard on every side, mere knowledge about God is never going to help us; we must cry out to Him and thrust our way upwards through the darkness to come before the throne of God: “Bring me through, Lord. Open the way. Make it possible. Don’t abandon the work of your hands!”
The Lord is no stranger to the desert. The ark of His presence hung suspended from poles as the Levites carried it through the wilderness, and His tent was pitched right in the middle of the Israelite camp each night. (1. Chron. 15:15; Num. 2:1) Seen and worshipped, or unseen and apparently absent, God does not abandon His children when they find themselves in barren wastes as different as can be from the Garden of Eden that He originally intended for them.
He was powerfully present with David in his various times in the midbar wilderness, even as He was with Jesus, during His extended sojourn praying and fasting in the wilderness of Sinai, where wild animals threatened, satan tempted and angels kept watch.