(2) Prayer (Kitab Al-Salat)
كتاب الصلاة
(245) Chapter: Straightening The Rows
(96) باب تَسْوِيَةِ الصُّفُوفِ
Sunan Abi Dawud 667 

Narrated Anas ibn Malik:

The Prophet (ﷺ) said: Stand close together in your rows, bring them near one another, and stand neck to neck, for by Him in Whose hand my soul is, I see the devil coming in through openings in the row just like a small black sheep.

حَدَّثَنَا مُسْلِمُ بْنُ إِبْرَاهِيمَ، حَدَّثَنَا أَبَانُ، عَنْ قَتَادَةَ، عَنْ أَنَسِ بْنِ مَالِكٍ، عَنْ رَسُولِ اللَّهِ صلى الله عليه وسلم قَالَ ‏ "‏ رُصُّوا صُفُوفَكُمْ وَقَارِبُوا بَيْنَهَا وَحَاذُوا بِالأَعْنَاقِ فَوَالَّذِي نَفْسِي بِيَدِهِ إِنِّي لأَرَى الشَّيْطَانَ يَدْخُلُ مِنْ خَلَلِ الصَّفِّ كَأَنَّهَا الْحَذَفُ ‏"‏ ‏.‏
Grade :  Sahih (Al-Albani) صحيح  (الألباني)حكم :
Reference : Sunan Abi Dawud 667
In-book reference : Book 2, Hadith 277
English translation : Book 2, Hadith 667