Anas bin Malik reported,

The Prophet ﷺ said, "Straighten your rows, for I see you from behind my back."Each one of us would press his shoulder against his companion's shoulder and his foot against his foot.

Bukhari 725

Sahih

حدثنا عمرو بن خالد قال حدثنا زهير عن حميد

عن أنس بن مالك

عن النبي ﷺ قال أقيموا صفوفكم فإني أراكم من وراء ظهري وكان أحدنا يلزق منكبه بمنكب صاحبه وقدمه بقدمه

البخاري 725صحيح
Contents
Reference
Commentary
Ayat
Collection
Sahih Bukhari
Book
Adhan
Chapter
Joining shoulder to shoulder and foot to foot in the row
Numbering
Darussalam 725
Bukhari 725