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. (Using translation from Abū Dāʾūd 667)
عَنْ رَسُولِ اللهِ ﷺ قَالَ رُصُّوا صُفُوفَكُمْ وَقَارِبُوا بَيْنَهَا وَحَاذُوا بِالْأَعْنَاقِ فَوَالَّذِي نَفْسِي بِيَدِهِ إِنِّي لَأَرَى الشَّيْطَانَ يَدْخُلُ مِنْ خَلَلِ الصَّفِّ كَأَنَّهَا الْحَذَفُ