Zaman Shah Durrani ushered through an era of prosperity that the
Durrani Empire had not seen for a while. However all was not good, with the
Barakzais chiefs who planned to topple Zaman Shah; they had laid the constituent articles that Zaman Shah should be overthrown and replaced by his brother,
Sujah Mirza, the Durrani crown should be elective, with the chiefs confirming the next rulers, and also that the kings who have been proven unworthy can be deposed by the chiefs. Wafadar Khan, the then
Wazir of the
Durrani Empire under the rule of
Zaman Shah Durrani began suspecting a plot was formulating on Zaman Shah, and discovered a plot where Payindah Khan Barakzai, Azim Khan Alakozai, the head of the Jawanshir
Qizilbash, and numerous other prominent chiefs. Wafadar Khan then informed Zaman Shah of what had come, where he fabricated witnesses to the event, while Payindah Khan's sons claimed Wafadar Khan was attempting to bring the fall of the
Barakzai. Nonetheless, Payindah Khan and other conspirators were rounded up and executed, with their heads being displayed publicly in
Kandahar. This execution brought dire consequences, such as the alliance between the Durranis and the Barakzais which was now broken. As a result, Fateh Khan, who was the eldest of Payindah Khan's children, fled to Persia where
Mahmud Shah Durrani was in exile, and swore his allegiance to him. As Zaman Shah became tied down in the
Punjab for his
campaigns, Mahmud Shah and Fateh Khan rallied and left for
Grishk, raising a force to march on Kandahar. The situation worsened when Zaman Shah executed the Durrani governor of
Kashmir after promising safe conduct. Upon hearing this, his brother, Saidal Khan, opened the gates of Kandahar to Mahmud Shah's force. With the fall of Kandahar, Mahmud Shah marched on Ghazni, and the two armies of Zaman Shah and Fateh Khan met at
Muqur. Before the battle even began, several prominent Sardars defected from Zaman Shah to the cause of Shah Mahmud, leading to Zaman Shah's army being dissolved in panic. With this, Mahmud Shah and Fateh Khan marched on Kabul, seizing it and establishing Shah Mahmud as the
new ruler. Wafadar Khan would be executed by Fateh Khan himself. Zaman Shah escaped out of
Kabul and took refuge at
Rawalpindi where he was met by
Ranjit Singh who gave him a house to stay in but later due to his safety concerns, Ranjit Singh welcomed him to stay in
Lahore, with a monthly allowance of 1,500 rupees. Later, from Lahore, Zaman Shah moved to
Ludhiana where he lived for the rest of his life.
First deposition of Mahmud Shah Durrani (1803) Shah Shuja Durrani began his attempt for the throne of the
Durrani Empire, and successfully defeated Mahmud Shah on 12 July 1803. Following this, Shah Shuja entered
Kabul and established his rule there. Zaman Shah then sent Qaizar Mirza to Kandahar, where Fateh Khan and
Kamran Shah Durrani resided. During this, Fateh Khan held negotiations with Qaizar Mirza and established terms for him to cede Kandahar. As a result, he opened the gates of Kandahar while Kamran Shah left for
Herat. However when Fateh Khan arrived in Kabul to pledge allegiance in person to Shah Shuja, the deal they established was not upheld, leaving Fateh Khan discontent.
Attempts to return to power (1803–1809) As a result, in the Autumn of 1803, when Shah Shuja left for
Peshawar to spend the winter there, Fateh Khan had freed numerous princes from the Bala Hissar and encouraged Qaizar Mirza to join this growing rebellion. When Shah Shuja sent a force against Qaizar, he surrendered and begged for mercy, to which he was pardoned and his position as the governor of
Kandahar was affirmed. Fateh Khan then attempted to flee to Herat, but returned after its governor pledged allegiance to Shah Shuja, leading to Fateh Khan being imprisoned in Kandahar by Qaizar. Despite this, he convinced Qaizar to free him, leading to Fateh Khan fleeing to
Grishk, where he raised a force with Kamran Shah, and they collectively marched on Kandahar. However, as the battle neared, Fateh Khan defected and the forces of Qaizar and Fateh Khan defeated Kamran Shah, Despite this, the alliance did not last long, and Fateh Khan again defected back to Kamran Shah, collectively uniting their forces under Firoz-al-Din, Kamran Shah, and Fateh Khan. However Firoz-al-Din fled before completing the campaign due to a Qajar invasion. As the Persians invaded Herat, Mukhtar al-Daula, the
Wazir of Shah Shuja, alongside Khwaja Khanji had placed Qaizar on the throne, with his firm support in Kandahar. Fateh Khan as well joined this revolt and pledged allegiance to Shah Qaizar. Despite this, on 3 March 1808, the rebellion was shattered at a battle outside of Peshawar. Numerous leaders were captured, and some impaled such as Mukhtar al-Daula. Following this, Qaizar Shah fled to Kohistan while Mahmud Shah reached Kandahar, joining forces with Fateh Khan. Shah Shuja defeated the coalition of Mahmud and Fateh Khan at
Qalati Ghilji but did not follow up with this victory, and returned to Peshawar. Shah Shuja attempted to re-conquer Kashmir, which was in a rebellious state, but his army was slaughtered attempting to do so. As a result, Mahmud Shah and Fateh Khan re-cooperated and Shah Shuja left Peshawar for
Jalalabad in June 1809. The two armies met at the
battle of Nimla, where Shah Shuja was decisively defeated. ==Return to power and second reign of Mahmud Shah (1809–1818)==