The Caliphate began as a series of Successors to the Prophet Muhammad. After the first four "Rightly Guided" Caliphs, the Umayyad Dynasty established the Caliphate in Damascus, until the Abbassid Dynasty moved the capitol of the Caliphate to Baghdad. In 1258 the Mongols attacked Baghdad, thus ending this dynasty. This is the main reason for the decline of the Caliphate.
After the conquest of Baghdad, the Caliphate continued under the Mongols in a weakened form. In the succeeding centuries what had once been a unified Islamic Empire was split into three: the Ottoman Empire centered on modern day Turkey, the Safavid Empire centered in modern Iran, and the Mughal Empire in India. The Ottomans claimed to revive and continue the Caliphate until the last Caliph died in 1924.