Hadithcore
Hadith #2102960

at-Tirmidhi has reported and graded as Sahih (authentic) the narration of Anas (RA):

"Avoid looking around when you are engaged in prayer, for looking around is destruction. And if you must do it, do so in the voluntary prayers."

وَلِلتِّرْمِذِيِّ : عَنْ أَنَسٍ ‏- وَصَحَّحَهُ ‏- { إِيَّاكَ وَالِالْتِفَاتَ فِي اَلصَّلَاةِ , فَإِنَّهُ هَلَكَةٌ , فَإِنْ كَانَ فَلَا بُدَّ فَفِي اَلتَّطَوُّعِ } [1]‏

References2 variants
Sunnah.com reference
Book 2, Hadith 113
Arabic/English book reference
Book 2, Hadith 242