عَنْ أَنَسِ بْنِ مَالِكٍ رَضِيَ اللَّهُ عَنْهُ، أَنَّ رَسُولَ اللَّهِ صَلَّى اللَّهُ عَلَيْهِ وَآلِهِ وَسَلَّمَ قَالَ: ((أَتِمُّوا الصَّفَّ الْأَوَّلَ ثُمَّ الَّذِي يَلِيهِ، فَإِنْ كَانَ نَقْصٌ فَلْيَكُنْ فِي الصَّفِّ الْمُؤَخَّرِ))
Sayyiduna Anas bin Malik (may Allah be pleased with him) narrates that the Messenger of Allah (peace and blessings be upon him) said: Complete the first row first, then the one after it; if there is any deficiency, it should be in the last row.