The Messenger of Allah ﷺ used to straighten our rows when we stood for prayer, and once we were aligned, he would say the takbir.
حدثنا عبيد الله بن معاذ حدثنا خالد بن الحارث حدثنا حاتم يعني ابن أبي صغيرة عن سماك قال سمعت
كان رسول الله ﷺ يسوي صفوفنا إذا قمنا للصلاة فإذا استوينا كبر
No references are available.
663. Takhrij: [Its isnad is sahih] Bayhaqi narrated it, 2/21, from the hadith of Abu Dawud through the same chain, with an error occurring in the printed edition, so see it.