Najib Khan, Ghulam Qadir, with his Sikh allies forced Shah Alam II to appoint him as the Grand Vizier of the Mughal Empire. Ghulam Qadir ravaged the palaces in search of the Mughal treasure believed to be worth Rs. 250 million. Unable to locate such a sum and angered by the Mughal Emperor's attempts to eliminate him and his Sikh allies, Ghulam Qadir himself blinded Shah Alam II with an Afghani knife on 10 August 1788. Ghulam Qadir behaved with brutality to the emperor and his family. Three servants and two water-carriers who tried to help the bleeding emperor were beheaded and according to one account, Ghulam Qadir would pull the beard of the elderly Mughal Emperor. After ten weeks, during which Ghulam Qadir stripped the princesses of the royal family naked and forced them to dance naked before him (after which they jumped into Yamuna river to drown) and the honour of the royal family and prestige of the Mughal Empire reached its lowest ebb, Mahadaji Shinde intervened and killed Ghulam Qadir, taking possession of Delhi on 2 October 1788. He restored Shah Alam II to the throne and acted as his protector. Mahadaji Shinde sent the ears and eyes of Ghulam Qadir to Shah Alam. Client of Mahadji Shinde Thankful for his intervention, he honoured Mahadji Shinde with the titles of Vakil-ul-Mutlaq (Regent of the Empire) and Amir-ul-Amara (Head of the Amirs). He made a deal with the Peshwa granting tribute to Pune in return for the protection provided Mahadji Shinde of the Maratha Confederacy. After killing Ghulam Qadir and restoring Shah Alam II to the throne, a Maratha garrison permanently occupied Delhi in 1788 and ruled on north India for next two decades until they were usurped by the East India Company following the Second Anglo-Maratha War in 1803. Arrival of British troops The French threat in Europe and its possible repercussions in India caused the British to strive to regain the custody of Shah Alam II. The British feared that the French military officers might overthrow Maratha power and use the authority of the Mughal emperor to further French ambition in India. Shah Alam II also corresponded with Hyder Ali and later with his son Tipu Sultan during their conflicts with the East India Company during the Anglo-Mysore Wars and was very well informed about the expansionist agenda of the British. After the Battle of Delhi