Blessed be the LORD: for he hath shewed me his marvellous kindness in a strong city. In a strong city - If this Psalm was written by David, this must refer to his taking refuge with achish, king of Gath, who gave him Ziklag, a fortified city, to secure himself and followers in. See 1 Samuel 27:6. This is more likely than that it was Keilah, where he only had intimation of the traitorous design of the inhabitants to deliver him up to Saul; so that the place was no refuge to him, howsoever fortified. Perhaps the passage may mean that, under the protection of God, he was as safe as if he had been in a fortified city.
Related Commentaries of Psalms 31:21
Psalms 31:21
21 Blessed be the LORD: for he hath shewed me his marvellous kindness in a strongd city.