New Defender's Study Bible Notes
23:1 last words of David. This assertion seems to suggest that Psalm 18, which is substantially identical to II Samuel 22, was slightly modified by David shortly before his death. The revised version is incorporated here by the anonymous author of II Samuel. Since both versions are divinely inspired, there must be some reason for the inclusion of both the original and revised versions of Psalm 18 in the Biblical canon. See the notes appended to Psalm 18.