Abu al-Qasim al-Jadali (may Allah have mercy on him) says: I heard Sayyiduna Nu'man bin Bashir (may Allah be pleased with him) say that the Prophet (peace and blessings be upon him) turned his blessed face towards the people and said: "Straighten your rows" (he said it three times). "By Allah, you will surely straighten your rows, or else Allah Almighty will cause discord between your hearts." He says: I saw every man pressing his shoulder against his companion's shoulder, his ankle against his companion's ankle, and his shin against his companion's shin.
Hadith Referenceالسنن الكبرى للبيهقي / كتاب الصلاة / 5183