I heard the Messenger of Allah ﷺ say, "Between a servant and disbelief, or polytheism, lies the abandonment of prayer."
حدثنا معاوية بن عمرو حدثنا أبو إسحاق عن الأعمش عن أبي سفيان
سمعت رسول الله ﷺ يقول بين العبد وبين الكفر أو الشرك ترك الصلاة
Its isnad is sahih. The hadith is found in Muslim 1/88, no. 82, in the Book of Faith, on the chapter stating that disbelief is applied to one who abandons prayer, and in Abu Dawud 4/219, no. 4678, in the Book of Sunnah, on refuting Irja, and in Tirmidhi 5/13, no. 2620, in the Book of Faith, on what has been said about abandoning prayer, where he said, hasan sahih, and in Nasai 1/231, no. 463, and Ibn Majah 1/342, no. 1078, in the Book of Establishing Prayer, and in Darimi 1/307, no. 1233, and in Hakim 1/6, where Dhahabi agreed with him.