He also repented of his sins. David was primarily concerned about his relationship with God.
إِثْرَ هذِهِ ٱلْحَادِثَةِ ،‏ نَظَمَ ٱلْمَلِكُ دَاوُدُ تَرْنِيمَةً ضَمَّنَهَا إِحْسَاسَهُ ٱلشَّدِيدَ بِٱلنَّدَمِ .‏