5 For in the day of trouble
he will keep me safe in his dwelling;
Psalm 27 provides much insight into the author himself, King David. Though a very spiritual man, the author often cries out against God, blaming Him when things go wrong and begging for relief. This is no pious devotion, but a constant struggle between God and forces that seem more real than Him. We see that the author feels along and betrayed.
Psalm 27 has shifts in moods throughout ever stanza. The opening declares a bold trust in God but in the second stanza, we see the author wanting to rest in God’s dwelling, tired of constantly chasing after him. In the third stanza, the author has lost all confidence and is pleading for help. It is out of these harsh trials that the faith in God is toughened. David readily recognizes God as his true source of protection.