God’s Messenger used to touch our shoulders at the prayer and say, “Keep straight; do not be irregular and so have your hearts irregular. Let those of you who are sedate and prudent be near me, then those who are next to them, then those who are next to them." Abu Mas'ud said, “Nowadays you are much more irregular."
‘Abdallah b. Mas'ud reported God’s Messenger as saying, “Let those of you who are sedate and prudent be near me, then those who are next to them (saying it three times), and beware of haphazardness* such as is found in markets.”
The iqama* had been uttered and God’s Messenger faced us and said, “Make your rows straight and stand close together, for l can see you behind my back.”
* A repetition of the words of the call to prayer after the worshippers have taken their places with the addition of a statement that the time of prayer has come.
Bukhari transmitted it. In the version given by Bukhari and Muslim he said, “Make the rows perfect, for I can see you behind my back."