Narrated Anas ibn Malik:
The Prophet (ﷺ) said: Complete the front row, then the one that comes next, and if there is any incompleteness, let it be in the last row.