Sahih Muslim 1420
The Book of Mosques and Places of Prayer
وَحَدَّثَنَا أَبُو بَكْرِ بْنُ أَبِي شَيْبَةَ، حَدَّثَنَا أَبُو أُسَامَةَ، عَنْ هِشَامٍ، عَنْ مُحَمَّدٍ، عَنْ عَبِيدَةَ، عَنْ عَلِيٍّ، قَالَ لَمَّا كَانَ يَوْمُ الأَحْزَابِ قَالَ رَسُولُ اللَّهِ صلى الله عليه وسلم " مَلأَ اللَّهُ قُبُورَهُمْ وَبُيُوتَهُمْ نَارًا كَمَا حَبَسُونَا وَشَغَلُونَا عَنِ الصَّلاَةِ الْوُسْطَى حَتَّى غَابَتِ الشَّمْسُ " .
Ali reported:When it was the day (of the Battle) of Ahzab, the Messenger of Allah (ﷺ) said: May Allah fill their graves and houses with fire, as they detained us and diverted us from the middle prayer, till the sun set
Text from the public-domain hadith-api dataset. Numbering follows that dataset and can differ by a few from some printed editions — check the wording, not only the number.