The Messenger of Allah ﷺ turned his face toward the people and said, "Straighten your rows," repeating it three times. "By Allah, you must straighten your rows, or Allah will surely set your hearts against one another."The narrator said, "I then saw each man pressing his shoulder against his companion's shoulder, his knee against his companion's knee, and his ankle against his companion's ankle."
حدثنا عثمان بن أبي شيبة حدثنا وكيع عن زكريا بن أبي زائدة عن أبي القاسم الجدلي قال سمعت
أقبل رسول الله ﷺ على الناس بوجهه فقال أقيموا صفوفكم ثلاثا والله لتقيمن صفوفكم أو ليخالفن الله بين قلوبكم قال فرأيت الرجل يلزق منكبه بمنكب صاحبه وركبته بركبة صاحبه وكعبه بكعبه
Sourcing, sahih. Bayhaqi reported it, 3/100, 101, from the hadith of Abu Dawud with the same wording. Ibn Khuzayma graded it sahih, no. 160, as did Ibn Hibban, no. 396. Bukhari referenced it without a full chain (Fath al-Bari, 2/211, before no. 725).Zakariya bin Abu Zaida stated explicitly that he heard it directly, as recorded by Daraqutni, 1/283, and Ibn Khuzayma and others.