Sunan an-Nasa'i, Hadith 818 ⓘ
It was narrated from Anas that the Messenger of Allah said: "Complete the first row, then the one behind it, and if any row is to be left incomplete let it be the last row."
أَخْبَرَنَا إِسْمَاعِيلُ بْنُ مَسْعُودٍ، عَنْ خَالِدٍ، قَالَ حَدَّثَنَا سَعِيدٌ، عَنْ قَتَادَةَ، عَنْ أَنَسٍ، أَنَّ رَسُولَ اللَّهِ صلى الله عليه وسلم قَالَ " أَتِمُّوا الصَّفَّ الأَوَّلَ ثُمَّ الَّذِي يَلِيهِ وَإِنْ كَانَ نَقْصٌ فَلْيَكُنْ فِي الصَّفِّ الْمُؤَخَّرِ " .
also referenced under: Book 10, Hadith 42 (In-Book) & Volume 1, Book 10, Hadith 819 (DarusSalam)