´It was narrated that 'Abdul Hamid bin Mahmud said:` "We were with Anas and we prayed with one of the Amirs. They pushed us until we stood and prayed between two rows, and Anas started moving backward and said: 'We used to avoid this at the time of the Messenger of Allah (ﷺ)."
Explanation & Benefits
Hafiz Muhammad Ameen
822. Commentary: The row with pillars will be interrupted in several places, and breaking the row is a sin. Therefore, instead of standing in the row with pillars, one should stand in the row in front of it or behind it. In an authentic hadith, it is explicitly prohibited to form a row between pillars. It is narrated from Qurra bin Iyas Muzani radi Allahu anhu that during the time of the Messenger of Allah sallallahu alayhi wa sallam, we were forbidden from making rows between pillars, and we were strictly prevented from doing so. See: [سنن ابن ماجة اقامة الصلوات حدیث : 1002]
However, this prohibition is in the case of congregational prayer. If a person wishes to pray alone, he may stand between the pillars, as the Messenger of Allah sallallahu alayhi wa sallam performed prayer between two pillars inside the Sacred Ka'bah. See: [صحیح البخاري الصلاة حدیث : 468]
Source: Sunan Nasa'i: Translation and Benefits by Shaykh Hafiz Muhammad Amin Hafizullah, Page: 822