According to Rashi, this perek is based on the story in Shmule II:18, when David Hamelech wanted to go to war together with his army, but they requested he instead stay behind in Yerushalayim to daven for their safety and victory. Perek 20 are his words of tefilla and encouragement to the Jewish people in times of war and crisis. Filled with faith and hope, he composes a short tefilla: ה' הושיעה המלך יעננו ביום קראנו...turning a יום צרה into a יום קראנו...May we merit to the salvation speedily, in our days.