The Messenger of Allah ﷺ said, "Straightening the rows is part of perfecting the prayer."
قال رسول الله ﷺ: إن من تمام الصلاة إقامة الصف.
Ahmad (14454) narrated it from Abdul-Razzaq, and it is in Musannaf (2/44), from Mamar, from Abdullah bin Muhammad bin Aqeel, from Jabir bin Abdullah, who related it. From this same route it was also transmitted by Abu Yaala (2168), and Tabarani in Kabir (1744) and in Awsat (3009), see Majma Bahrayn (760). Its chain is hasan on account of Abdullah bin Muhammad bin Aqeel, whose biography has already been given.Haythami said in Majma (2/89), "Ahmad, Abu Yaala, and Tabarani in Kabir and Awsat narrated it, and in it is Abdullah bin Muhammad bin Aqeel, concerning whom there is disagreement over relying on his transmission."I say, this is indeed the case. I have discussed him in detail in the chapter on purification, and I have shown that his hadith is hasan.