Sahih Muslim 433
Sahih Muslim · Book 4: The Book of Prayers · Straightening The Rows; The Virtue Of The Front Row And Then The Next; Competing With One Another For The Front Row; The People Of Virtue Should Take Precedence And Be Closest To The Imam
Anas b. Malik reported:
حَدَّثَنَا مُحَمَّدُ بْنُ الْمُثَنَّى ، وَابْنُ، بَشَّارٍ قَالاَ حَدَّثَنَا مُحَمَّدُ بْنُ جَعْفَرٍ ، حَدَّثَنَا شُعْبَةُ ، قَالَ سَمِعْتُ قَتَادَةَ ، يُحَدِّثُ عَنْ أَنَسِ بْنِ مَالِكٍ ، قَالَ قَالَ رَسُولُ اللَّهِ صلى الله عليه وسلم " سَوُّوا صُفُوفَكُمْ فَإِنَّ تَسْوِيَةَ الصَّفِّ مِنْ تَمَامِ الصَّلاَةِ " .
The Messenger of Allah (ﷺ) said: Straighten your rows. for the straightening of a row is a part of the perfection of prayer.