38-Surah Sad ( The Letter Sad ) 21
And has there come to you the news of the adversaries, when they climbed over the wall of [his] prayer chamber -
۞ وَهَلْ أَتَاكَ نَبَأُ الْخَصْمِ إِذْ تَسَوَّرُوا الْمِحْرَابَ
Quran's Tafhim ( explanation)
*21) The object why the Prophet David has been mentioned here is to relate the story that begins from here; the object of mentioning his sterling qualities in the introduction was only to point out the high calibre of the Prophet David with whom this incident took place.