The Messenger of Allah [sallallahu ‘alayhi wasallam] said
HOW CAN MY UMMAH PERISH WHEN I AM AT IT’S BEGINNING, JESUS SON OF MARY, AT ITS END AND THE MAHDI FROM MY PROGENY WILL BE IN THE MIDDLE OF IT. BUT IN BETWEEN THIS, THERE WILL BE A LARGE DETRACTED GROUP. NEITHER I BELONG TO THEM NOR THEY BELONG TO ME”
The above tradition has been quoted in Musnad of Imam Ahmad from Ibn AbbasRZ, by Abu Nu-aym Isphahani from Ibn Abbas, in Kanzul Ummal from Ali, in Mishkat and it’s commentaries Mirqat and Lumu-at from Imam Jafar and Razeem, by Hakim from Abdullah Ibn UmarRZ, and in Tafseer-e-Madarik with some variance in words.