Sayyiduna Anas bin Malik (may Allah be pleased with him) narrates: When the Prophet Muhammad (peace and blessings be upon him) would stand to perform prayer, before saying the takbeer, he would face us and instruct: "Straighten the rows and do not leave gaps between them, for I can see you behind my back."
Hadith Referenceصحیح ابن حبان / كتاب الصلاة / 2173
Hadith Gradingفضيلة الشيخ الإمام محمد ناصر الدين الألبانيصحيح - «الصحيحة» (31 و 3955): خ وم.فضيلة الشيخ العلّامة شُعيب الأرناؤوطإسناده صحيح على شرط مسلم، رجاله رجال الشيخين غير يحيى بن أيوب، فإنه من رجال مسلم.