Hadith 668
حَدَّثَنَا أَبُو الْوَلِيدِ الطَّيَالِسِيُّ، وَسُلَيْمَانُ بْنُ حَرْبٍ، قَالاَ حَدَّثَنَا شُعْبَةُ، عَنْ قَتَادَةَ، عَنْ أَنَسٍ، قَالَ قَالَ رَسُولُ اللَّهِ صلى الله عليه وسلم " سَوُّوا صُفُوفَكُمْ فَإِنَّ تَسْوِيَةَ الصَّفِّ مِنْ تَمَامِ الصَّلاَةِ " .
Anas reported the Messenger of Allah (ﷺ) as saying :
Straighten your rows for the straightening of the rows is part of perfecting the prayer.
Reference : Sunan Abi Dawud 668
In-book reference : Book 2, Hadith 278