Psalm 27 is an exuberant declaration of faith. This psalm was written by King David when he was “a hunted fugitive, finding refuge in the rocks and caves of the wilderness” (Education, 164). The context of psalm 27 is found in 1 Samuel 22, where David is running for his life, and Saul savagely murders 85 priests, and then turns his sword against all the women and children and cattle in the city of Nob where they live. So, this is a serious time of trouble for David, and what is he doing? Exuberantly declaring his absolute confidence in the LORD. Source: https://www.youtube.com/watch?v=q_aQtw3qp3U