Sahih al-Bukhari, Book 10, Hadith 117 (Bukhari 705)

Narrated Anas bin Malik:

The Prophet (ﷺ) said, "Straighten your rows as the straightening of rows is essential for a perfect and correct prayer. "