The Messenger of Allah ﷺ said, "I have considered ordering the prayer to be established, then commanding a man to lead the people in prayer, while I set out with some men carrying bundles of firewood to those who do not attend the prayer, and burn their houses down upon them with fire."
حدثنا أبو بكر بن أبي شيبة حدثنا أبو معاوية عن الأعمش عن أبي صالح
قال رسول الله ﷺ لقد هممت أن آمر بالصلاة فتقام ثم آمر رجلا فيصلي بالناس ثم أنطلق برجال معهم حزم من حطب إلى قوم لا يشهدون الصلاة فأحرق عليهم بيوتهم بالنار
Sahih. Reported by Abu Dawud, Prayer, chapter on the severity concerning abandoning congregational prayer, no. 548, from the hadith of Abu Muawiya with this wording. It is a hadith agreed upon, narrated from Amash with this wording, and by Bukhari, no. 657, and Muslim, no. 651.