"Three will fight one another for your treasure, each one of them the son of a caliph, but none of them will gain it. Then the black banners will come from the east, and they will kill you in an unprecedented manner." Then he mentioned something that I do not remember, then he said: "When you see them, then pledge your allegiance to them even if you have to crawl over the snow, for that is the caliph of Allah, Mahdi." (Using translation from Ibn Mājah 4084)
قَالَ رَسُولُ اللَّهِ ﷺ «يَقْتَتِلُ عِنْدَ كَنْزِكُمْ ثَلَاثَةٌ كُلُّهُمُ ابْنُ خَلِيفَةَ ثُمَّ لَا يَصِيرُ إِلَى وَاحِدٍ مِنْهُمْ ثُمَّ تَطْلُعُ الرَّايَاتُ السُّودُ مِنْ قِبَلِ الْمَشْرِقِ فَيُقَاتِلُونَكُمْ قِتَالًا لَمْ يُقَاتِلْهُ قَوْمٌ ثُمَّ ذَكَرَ شَيْئًا فَقَالَ إِذَا رَأَيْتُمُوهُ فَبَايِعُوهُ وَلَوْ حَبْوًا عَلَى الثَّلْجِ فَإِنَّهُ خَلِيفَةُ اللَّهِ الْمَهْدِيُّ»