Question:
If a worshipper forms a row by himself because there is no room in the row, will his prayer be valid?
Answer:
If there is room in the front row, one should not pray standing alone behind it. If someone prays in this way, he should repeat the prayer.
It is reported in a hadith:
أَنَّ النَّبِيَّ صَلَّي اللهُ عَلَيْهِ وَسَلَّمَ رَأَيٰ رَجُلًا يُصَلِّيْ خَلْفَ الصَّفِّ وَحْدَهُ فَأَمَرَهُ أَنْ يُّعِيْدَ
“The Prophet ﷺ saw a man praying alone behind the row, so he ﷺ commanded him to repeat the prayer.”
There is no authentic hadith established about pulling someone back from the front row. As for the narration from Ibn Abbas (may Allah be pleased with them both) in al-Mu’jam al-Awsat of al-Tabarani concerning pulling someone back, in its chain of narration the narrator Bishr bin Ibrahim is extremely weak (da’if), as Hafiz Ibn Hajar (may Allah have mercy on him) and Imam al-Haythami (may Allah have mercy on him) have declared it weak.
In our society it is commonly known that when the congregation is underway and there is no room in the row, one pulls a man back from the front row to join him for the prayer. There is no proof for this in an authentic (sahih) hadith; rather, breaking the row is not correct at all, because there is a hadith:
مَنْ وَصَلَ صَفًّا وَصَلَهُ اللهُ وَمَنْ قَطَعَ صَفًّا قَطَعَهُ اللهُ
“Whoever joins a row, Allah will join him, and whoever cuts a row, Allah the Most High will cut him off.”
The meaning of the previous hadith, which mentions that one must repeat the prayer after praying alone in a row, is that if there is room in the front row and he still prays alone behind, he will have to repeat the prayer; but if there is no room at all in the front row and he then prays alone behind, then, if Allah wills, his prayer will be valid. Shaykh Ibn Baz (may Allah have mercy on him) and Allamah Nasir al-Din al-Albani (may Allah have mercy on him) have adopted this position, and they have also narrated this same position from Imam Ibn Taymiyyah (may Allah have mercy on him). See:
Imam Malik, Imam Ahmad, Imam al-Awza’i, Imam Ishaq, Imam Abu Hanifah and Imam Dawud al-Zahiri (may Allah have mercy on them) hold this same view, that a man should not be pulled back from the row.