I heard the Messenger of Allah ﷺ say, "The covenant between us and them is the prayer, so whoever abandons it has disbelieved."
حدثنا علي بن الحسن يعني ابن شقيق حدثنا الحسين بن واقد حدثنا
سمعت رسول الله ﷺ يقول العهد الذي بيننا وبينهم الصلاة فمن تركها فقد كفر
Its isnad is sahih. It is found in Tirmidhi 5/14, no. 2621, in the Book of Faith, where he said, hasan sahih gharib. Also in Nasai 1/231, no. 463, in the Book of Prayer, and Ibn Majah 1/342, no. 1079. Hakim graded it sahih 1/7, and Dhahabi said nothing about it.