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.
Hadith Referenceالفتح الربانی / أبواب صلاة الجماعة / 2655