Sayyiduna Anas (may Allah be pleased with him) said: The Messenger (peace and blessings of Allah be upon him) said: "Straighten your rows, for straightening the rows is part of perfecting the prayer."
Hadith Referenceسنن دارمي / من كتاب الصللاة / 1297
Hadith Gradingتحقیق (حسین سلیم أسد الدارانی):إسناده صحيح والحديث متفق عليه، [مكتبه الشامله نمبر: 1298]
Hadith Takhrijیہ حدیث صحیح متفق علیہ ہے۔ دیکھئے: [بخاري 723] ، [مسلم 433] ، [أبويعلی 2997] ، [ابن حبان 2171]
Brief Explanation
(Commentary on Hadith 1296) That is, keeping the rows straight is a means of bringing the prayer to its perfection and completion, and the Messenger of Allah (sallallahu alayhi wa sallam) used to give great importance to keeping the rows straight and would always emphasize it, and would warn of punishment for not standing straight in the rows, as will be mentioned ahead.