(28) باب تَسْوِيَةِ الصُّفُوفِ وَإِقَامَتِهَا وَفَضْلِ الأَوَّلِ فَالأَوَّلِ مِنْهَا وَالاِزْدِحَامِ عَلَى الصَّفِّ الأَوَّلِ وَالْمُسَابَقَةِ إِلَيْهَا وَتَقْدِيمِ أُولِي الْفَضْلِ وَتَقْرِيبِهِمْ مِنَ الإِمَامِ
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.
Reference: Sahih Muslim 433
In-book reference: Book 4, Hadith 137
USC-MSA web (English) reference(deprecated numbering scheme): Book 4, Hadith 871