The Messenger of Allah ﷺ came out to us and said, "Will you not line up in rows as the angels line up before their Lord?"They asked, "How do the angels line up before their Lord?"He replied, "They complete the first row, then they stand close together in the row."
أخبرنا قتيبة قال حدثنا الفضيل بن عياض عن الأعمش عن المسيب بن رافع عن تميم بن طرفة
خرج إلينا رسول الله ﷺ فقال ألا تصفون كما تصف الملائكة عند ربهم قالوا وكيف تصف الملائكة عند ربهم قال يتمون الصف الأول ثم يتراصون في الصف
Muslim reported it in "the Prayer," chapter "The command to be still in prayer and the prohibition of gesturing with the hand..." etc., hadith no. 430, from the hadith of Amash, by this route, and it is also in Kubra, hadith no. 890.