Caution: Translations of Quran and Ḥadīth may lead to possible misapplications and misinterpretations. This site is intended for students of sacred knowledge that are proficient in comprehending classical Arabic and have a strong foundation in Islamic sciences. Also note that religious injunctions rely on several aspects beyond what one may glean through reading individual aḥādīth.
bayhaqi:5181Abū al-Ḥasan al-ʿAlawī > Abū Bakr Muḥammad b. Aḥmad b. Dallūwayh al-Daqqāq > Aḥmad b. Ḥafṣ b. ʿAbdullāh from my father > Ibrāhīm b. Ṭahmān > Simāk b. Ḥarb > al-Nuʿmān b. Bashīr > Samiʿtuh

[Machine] I heard him saying that the Prophet ﷺ used to straighten the rows and he saw a man standing outside the row, so he said, "Either you straighten your rows or Allah will cause division among your faces on the Day of Resurrection."  

البيهقي:٥١٨١أَخْبَرَنَا أَبُو الْحَسَنِ الْعَلَوِيُّ أنبأ أَبُو بَكْرٍ مُحَمَّدُ بْنُ أَحْمَدَ بْنِ دَلُّوَيْهِ الدَّقَّاقُ أنبأ أَحْمَدُ بْنُ حَفْصِ بْنِ عَبْدِ اللهِ حَدَّثَنِي أَبِي حَدَّثَنِي إِبْرَاهِيمُ بْنُ طَهْمَانَ عَنْ سِمَاكِ بْنِ حَرْبٍ عَنِ النُّعْمَانِ بْنِ بَشِيرٍ قَالَ

سَمِعْتُهُ يَقُولُ كَانَ رَسُولُ اللهِ ﷺ يُسَوِّي الصُّفُوفَ فَرَأَى رَجُلًا خَارِجًا مِنَ الصَّفِّ فَقَالَ لَتُقِيمُنَّ صُفُوفَكُمْ أَوْ لَيُخَالِفَنَّ اللهُ بَيْنَ وُجُوهِكُمْ يَوْمَ الْقِيَامَةِ  

أَخْرَجَهُ مُسْلِمٌ مِنْ وَجْهٍ آخَرَ عَنْ سِمَاكٍ

See similar narrations below:

Collected by Nasāʾī, Nasāʾī's Kubrá
nasai:810Qutaybah b. Saʿīd > Abū al-Aḥwaṣ > Simāk > al-Nuʿmān b. Bashīr

"The Messenger of Allah ﷺ used to straighten the rows like shaft of an arrow is straightened before the head is attached to it. He saw a man whose chest was sticking out from the row. I saw the Messenger of Allah ﷺ say: 'Make your rows straight or Allah will cause your faces to be deformed."  

النسائي:٨١٠أَخْبَرَنَا قُتَيْبَةُ بْنُ سَعِيدٍ قَالَ أَنْبَأَنَا أَبُو الأَحْوَصِ عَنْ سِمَاكٍ عَنِ النُّعْمَانِ بْنِ بَشِيرٍ قَالَ

كَانَ رَسُولُ اللَّهِ ﷺ يُقَوِّمُ الصُّفُوفَ كَمَا تُقَوَّمُ الْقِدَاحُ فَأَبْصَرَ رَجُلاً خَارِجًا صَدْرُهُ مِنَ الصَّفِّ فَلَقَدْ رَأَيْتُ النَّبِيَّ ﷺ يَقُولُ لَتُقِيمُنَّ صُفُوفَكُمْ أَوْ لَيُخَالِفَنَّ اللَّهُ بَيْنَ وُجُوهِكُمْ  

nasai-kubra:886Qutaybah b. Saʿīd > Abū al-Aḥwaṣ > Simāk > al-Nuʿmān b. Bashīr

"The Messenger of Allah ﷺ used to straighten the rows like shaft of an arrow is straightened before the head is attached to it. He saw a man whose chest was sticking out from the row. I saw the Messenger of Allah ﷺ say: 'Make your rows straight or Allah will cause your faces to be deformed." (Using translation from Nasāʾī 810)  

الكبرى للنسائي:٨٨٦أَخْبَرَنَا قُتَيْبَةُ بْنُ سَعِيدٍ قَالَ حَدَّثَنَا أَبُو الْأَحْوَصِ عَنْ سِمَاكٍ عَنِ النُّعْمَانِ بْنِ بَشِيرٍ قَالَ

كَانَ رَسُولُ اللهِ ﷺ يُقَوِّمُ الصُّفُوفَ كَمَا تُقَوَّمُ الْقِدَاحُ فَأَبْصَرَ رَجُلًا خَارِجًا صَدْرُهُ مِنَ الصَّفِّ فَلَقَدْ رَأَيْتُ النَّبِيَّ ﷺ يَقُولُ «لَتُقِيمُنَّ صُفُوفَكُمْ أَوْ لَيُخَالِفَنَّ اللهُ بَيْنَ وُجُوهَكُمْ»