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.
Sunan Abi Dawud Book 2, Hadith 281