IMAM AHMED RAZA'S I'LM-E-JAFAR:
"I'lm-e-Jafar" refers to "The Knowledge and The Art of Prediction." Not all persons are blessed with such knowledge by Almighty Allah. It is a speciality for the Awliyah Allah. A'la Hadrat (alaihir rahmah) was blessed with the gift of I'lm-e-Jafar.
Once, a certain person asked A'la Hadrat (alaihir rahmah) concerning the approach of Qiyaamah and the arrival of Imam Mahdi in the future. A'la Hadrat (alaihir rahmah) said that Almighty Allah knows of this and His beloved Rasool (sallal laahu alaihi wasallam) is also aware of this fact. After saying this A'la Hadrat (alaihir rahmah) substantiated these facts by quoting many verses of the Holy Quran and Ahadith of the Holy Prophet (sallal laahu alaihi wasallam). A'la Hadrat (alaihir rahmah) then said, "THROUGH A CERTAIN TYPE OF KNOWLEDGE, I FEEL THAT THERE IS A POSSIBILITY THAT IN 1837 HIJRAH THERE WILL BE NO ISLAMIC GOVERNMENT LEFT, AND IN 1900 HIJRA IMAM MAHDI WILL APPEAR". After hearing this answer, someone asked A'la Hadrat (alaihir rahmah) if he had gained this answer through I'lm-e-Jafar. He replied that he did. A'la Hadrat (alaihir rahmah) then said very sarcastically, "Eat the mangoes. Do not count the trees."
There was a King of Rampur whose wife was very sick. He loved her very much and was very attached to her. This King, who was a "Badd Mazhab" (one who does not follow the religion properly), sent a messenger to Bareilly Shareef with a special request. He requested A'la Hadrat (alaihir rahmah) to predict the time and place of the death of his wife. The King's wife was, at that moment, not at her house in Rampur, but she was in a place called Nainital. A'la Hadrat (alaihir rahmah) told the messenger to tell the King that his wife will die in Rampur in the month of Muharram. When the messenger returned to the King, he gave him the message of A'la Hadrat (alaihir rahmah).
With this message of A'la Hadrat (alaihir rahmah) at the back of his mind, the King tried very hard to keep his wife away from Rampur. He did not want her to be in any way near Rampur.
It so happened that rioting broke out in Rampur. It concerned the affairs of the Kanpur Shaheed Ganj Musjid. The Governor summoned the King to meet with him urgently in Rampur. The King decided to go on his own, but his wife insisted on joining him. As soon as they reached Rampur, the King's wife suddenly died. It was also the month of Muharram. The prediction of A'la Hadrat (alaihir rahmah) proved to be true!