The Messenger of Allah ﷺ said, "Part of completing the prayer is straightening the rows."
حدثنا عبد الرزاق حدثنا معمر عن عبد الله بن محمد بن عقيل
قال رسول الله ﷺ إن من تمام الصلاة إقامة الصف
Its isnad is hasan due to Abdullah bin Muhammad bin Aqeel, and the hadith previously appeared at 13877.