Abdullah bin Amr relates: I heard Allah's Apostle, peace and blessing of Allah be upon him, say, “Allah does not take away knowledge by expunging it from (the hearts of) the people, but He takes it away through the death of the learned and righteous men till when none of them remains, people take as their leaders the ignorant, who, when consulted, give their verdict without knowledge. So they will go astray and will also lead the people astray.”
This hadith is qouted by compilers of all Sihah (authentics), including Bukhari and Muslim. 
Here the Holy Prophetsaw describes the process by which religions suffer their decline. It is a process of gradual degradation which manifests when word and actions of its followers become incongruent. At another time, he described the first three centuries of Islam as the ‘Best of times’ (Khair-ul-Quroon), which would be followed by a general decline. Thereafter, a thousand years of darkness would take Muslims to a dangerously precarious state of existence. Their worldly leadership was described as incompetent and dishonest. Their moral afflictions were to be adultery, alcohol and ills to do with abundance of wealth. In a hadith narrated by Hazrat Alira, their religious leadership has been condemned in the following words:
A time comes on (our) people when Islam will be left merely in its name. Nothing of the Quran will remain except its letters. Their mosques will be full of people, yet will be empty of all righteousness. Their ulema (scholars) will be the worst creatures under the firmament of the heavens. From them will emerge discordance and to them shall it return.
This hadith is accepted as authentic by Sunnis as well as Shias.
It has been quite a while since these indicators of the decline of Islam have been fulfilled in their entirety. Nawab Nur-ul-Hasan Khan who was the son of Nawab Siddiq Hasan Khan and a prominent Ahl-Hadith scholar, wrote a hundred years ago: “Ever since these dissensions, this ummah has been unable to recover its balance. Its weakness has grown such that now we find Islam only in its name, and Quran only in its letters, mosques apparently are crowded, yet are devoid of guidance. The scholars of this ummah are the worst under the sky—from them do conflicts emerge and in them do they culminate.”
Maulana Hali (1837-1914), describes the pitiful state of Muslims in the following couplet:
Neither the religion nor Islam remains
Only that which remains is its name
Therefore, at exactly the right time, when these indicators were firmly in place, Hazrat Mirza Ghulam Ahmad Qadiani declared that he was commissioned to bring about the reformation of Islam. With the Grace of God, he fulfilled his mission by the establishment of a righteous community about which the renowned poet and philosopher Sir Muhammad Iqbal (1877-1938), had this to say:
If there is one community that exhibits the true model of Islamic practice, it is the Jamaat Ahmadiyya.
 Bukhari Kitab-ul-Ilm, Bab Kaif Yaqbud-ul-Ilm.
 'Amdah Al Qari—Sharah Bukhari by Allama Badruddin Aini, vol. 1, p.528, pub. Dar-u-Taba, Cairo.
 Bukhari Kitab-u-Shahadaat, Bab La Yashad Ala Shahdah Joor
 Bukhari Kitab-u-Shahadaat, Bab Rafa Ilm wa Zuhurul Jahl
 Shaib-ul-Iman by Imam Bahiqi (d. 484 A.H.), part 2, p. 311, pub. Darul Kutub Al-Ilmia, Beirut. Mishkat Kitab-ul-Ilm Al Furu min Al-Jame Al-Kafi, vol. 3, p. 144 by Allama Abu Jaffar Muhammad bin Kalbi, pub. Nau Lakthur.
 Bihar-ul-Anwaar, vol 52, p. 10, pub. Dar-ul-Ahya Al-Tarath Al-Arabi, Beirut, 1982.
 Iqtarab Al-Sa'a., p. 12 by Nur-ul-Hasan Khan, pub. Sayed Al Matabe, Benaras, 1322 A.H.
 Kashf Al-Ghumma Fil Marifa Al-Ayemma, vol 3, p. 270-271, pub. Abul Hasan Al Arbali, Darul Azwa, Beirut.
 Millat Beza Par Aik Imrani Nazar, p.18. Transalation of English lecture by Iqbal, 1910 at Aligarh. Translated by Molvi Zafar Ali Khan, pub. Daftar Akkhbar Raftar Zamana, Meo Road, Lahore