The Prophet (ﷺ) said: Have the imam in the centre and close up the gaps.

Sunan Abu Dawud Book 2 Hadith 291

Sunan Abu Dawud #681

Prayer (Kitab Al-Salat) 2:291

Narrated AbuHurayrah:

The Prophet (ﷺ) said: Have the imam in the centre and close up the gaps.

Chapter: The Position That The Imam Should Have In Relation To The Rows