The Messenger of Allah ﷺ said, "Straighten your rows, or Allah will set your faces against one another."
حدثنا يحيى بن سعيد عن شعبة حدثني عمرو بن مرة قال سمعت سالم بن أبي الجعد قال سمعت
عن رسول الله ﷺ يقول لتسون صفوفكم أو ليخالفن الله بين وجوهكم
Its isnad is sahih, it has preceded many times with a different wording, and the hadith was narrated by Bukhari 1/206, no. 717, Fath, and Muslim 1/318, no. 994.