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."