Hadithcore
Musnad Ahmad, 1107
hasan· Darussalam

It was narrated that ‘Ali (رضي الله عنه) said:

The Messenger of Allah (ﷺ) came first, Abu Bakr came second and `Umar came third. Then we got involved in turmoil, and it is up to Allah to judge.

حَدَّثَنَا وَكِيعٌ، عَنْ سُفْيَانَ، عَنْ أَبِي هَاشِمِ بْنِ كَثِيرٍ، عَنْ قَيْسٍ الْخَارِفِيِّ، عَنْ عَلِيٍّ، رَضِيَ اللَّهُ عَنْهُ قَالَ سَبَقَ رَسُولُ اللَّهِ صَلَّى اللَّهُ عَلَيْهِ وَسَلَّمَ وَصَلَّى أَبُو بَكْرٍ وَثَلَّثَ عُمَرُ ثُمَّ خَبَطَتْنَا فِتْنَةٌ فَهُوَ مَا شَاءَ اللَّهُ‏.‏

References1 variant
In-Book Reference
Book 5, Hadith 523